diff --git a/analysis_options.yaml b/analysis_options.yaml index 5a160d9d8582..6a87b84faaf1 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -20,6 +20,8 @@ analyzer: # Ignore generated files - '**/*.pb.dart' - '**/*.g.dart' + - '**/*.gen.jni.dart' + - '**/*.gen.ffi.dart' - '**/*.mocks.dart' # Mockito @GenerateMocks linter: diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index d14e07c1b4b4..eb29749b3425 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,7 @@ +## 26.4.0 + +* [swift] [kotlin] Adds support for FFI and JNI. + ## 26.3.1 * Fixes dartdoc comments that accidentally used HTML. diff --git a/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift b/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift index 70cab0a27bec..8871539f8c5d 100644 --- a/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift +++ b/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift @@ -15,7 +15,15 @@ import Foundation #endif private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull } private func nilOrValue(_ value: Any?) -> T? { diff --git a/packages/pigeon/example/app/ios/Runner/Messages.g.swift b/packages/pigeon/example/app/ios/Runner/Messages.g.swift index f8b12f846c22..00f5a5010ee5 100644 --- a/packages/pigeon/example/app/ios/Runner/Messages.g.swift +++ b/packages/pigeon/example/app/ios/Runner/Messages.g.swift @@ -65,7 +65,15 @@ private func createConnectionError(withChannelName channelName: String) -> Pigeo } private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull } private func nilOrValue(_ value: Any?) -> T? { @@ -349,6 +357,7 @@ class ExampleHostApiSetup { } } } + /// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift. protocol MessageFlutterApiProtocol { func flutterMethod( diff --git a/packages/pigeon/example/app/lib/src/event_channel_messages.g.dart b/packages/pigeon/example/app/lib/src/event_channel_messages.g.dart index 0a31f7b13d7c..f31a3728e916 100644 --- a/packages/pigeon/example/app/lib/src/event_channel_messages.g.dart +++ b/packages/pigeon/example/app/lib/src/event_channel_messages.g.dart @@ -8,7 +8,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -110,6 +109,11 @@ class IntEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class StringEvent extends PlatformEvent { @@ -145,6 +149,11 @@ class StringEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { diff --git a/packages/pigeon/example/app/lib/src/messages.g.dart b/packages/pigeon/example/app/lib/src/messages.g.dart index 9efe3e125b07..4e810fe2b0d6 100644 --- a/packages/pigeon/example/app/lib/src/messages.g.dart +++ b/packages/pigeon/example/app/lib/src/messages.g.dart @@ -8,7 +8,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -168,6 +167,11 @@ class MessageData { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -203,8 +207,8 @@ class _PigeonCodec extends StandardMessageCodec { } class ExampleHostApi { - /// Constructor for [ExampleHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [ExampleHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. ExampleHostApi({ BinaryMessenger? binaryMessenger, @@ -213,8 +217,8 @@ class ExampleHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/lib/jnigen_fix.dart b/packages/pigeon/lib/jnigen_fix.dart new file mode 100644 index 000000000000..a444a8328546 --- /dev/null +++ b/packages/pigeon/lib/jnigen_fix.dart @@ -0,0 +1,31 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:io'; + +// TODO(tarrinneal): Remove this file when the issue is fixed: https://github.com/dart-lang/native/issues/3235 +/// Applies a post-generation patch to fix generic typing bugs in the jnigen output. +/// See specific issue with casting mapped types using older jnigen generators. +void fixJniBindings(String jnigenOutputPath) { + final file = File(jnigenOutputPath); + if (!file.existsSync()) { + // ignore: avoid_print + print('WARNING: fixJniBindings could not find file: $jnigenOutputPath'); + return; + } + String content = file.readAsStringSync(); + + final regex = RegExp( + r'\$o(\??)\.as<(.+?)>\(\s*(jni\$_.[A-Za-z0-9_]+\.type),\s*releaseOriginal:', + ); + + content = content.replaceAllMapped(regex, (Match match) { + final String? optional = match.group(1); + final String? type = match.group(2); + final String? jniType = match.group(3); + return '\$o$optional.as<$type>(\n $jniType as jni\$_.JType<$type>,\n releaseOriginal:'; + }); + + file.writeAsStringSync(content); +} diff --git a/packages/pigeon/lib/src/ast.dart b/packages/pigeon/lib/src/ast.dart index aba0e0891cae..b1dd5785bb47 100644 --- a/packages/pigeon/lib/src/ast.dart +++ b/packages/pigeon/lib/src/ast.dart @@ -526,6 +526,24 @@ class TypeDeclaration { /// Associated [AstProxyApi], if any. final AstProxyApi? associatedProxyApi; + /// Returns the full annotated name of the type. + String getFullName({bool withNullable = true}) { + if (baseName == 'List' || baseName == 'Map') { + return '$baseName<$typeArgumentsString>${isNullable && withNullable ? '?' : ''}'; + } + return '$baseName${isNullable && withNullable ? '?' : ''}'; + } + + /// Returns the Type Arguments in annotation form. + String get typeArgumentsString { + if (baseName == 'List') { + return typeArguments.firstOrNull?.getFullName() ?? 'Object?'; + } else if (baseName == 'Map') { + return '${typeArguments.firstOrNull?.getFullName() ?? 'Object?'}, ${typeArguments.lastOrNull?.getFullName() ?? 'Object?'}'; + } + return ''; + } + @override int get hashCode { // This has to be implemented because TypeDeclaration is used as a Key to a @@ -834,6 +852,8 @@ class Root extends Node { required this.classes, required this.apis, required this.enums, + this.lists = const {}, + this.maps = const {}, this.containsHostApi = false, this.containsFlutterApi = false, this.containsProxyApi = false, @@ -842,7 +862,13 @@ class Root extends Node { /// Factory function for generating an empty root, usually used when early errors are encountered. factory Root.makeEmpty() { - return Root(apis: [], classes: [], enums: []); + return Root( + apis: [], + classes: [], + enums: [], + lists: {}, + maps: {}, + ); } /// All the classes contained in the AST. @@ -854,6 +880,12 @@ class Root extends Node { /// All of the enums contained in the AST. List enums; + /// All of the lists contained in the AST. + Map lists; + + /// All of the maps contained in the AST. + Map maps; + /// Whether the root has any Host API definitions. bool containsHostApi; @@ -876,6 +908,6 @@ class Root extends Node { @override String toString() { - return '(Root classes:$classes apis:$apis enums:$enums)'; + return '(Root classes:$classes apis:$apis enums:$enums lists:$lists maps:$maps containsHostApi:$containsHostApi containsFlutterApi:$containsFlutterApi containsProxyApi:$containsProxyApi)'; } } diff --git a/packages/pigeon/lib/src/cpp/cpp_generator.dart b/packages/pigeon/lib/src/cpp/cpp_generator.dart index ffaf56787d66..0e9882062f76 100644 --- a/packages/pigeon/lib/src/cpp/cpp_generator.dart +++ b/packages/pigeon/lib/src/cpp/cpp_generator.dart @@ -98,7 +98,7 @@ class CppOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [CppOptions]. CppOptions merge(CppOptions options) { - return CppOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return CppOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/dart/dart_generator.dart b/packages/pigeon/lib/src/dart/dart_generator.dart index fb65af36f161..41a762c7e13a 100644 --- a/packages/pigeon/lib/src/dart/dart_generator.dart +++ b/packages/pigeon/lib/src/dart/dart_generator.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'package:code_builder/code_builder.dart' as cb; +import 'package:collection/collection.dart'; import 'package:dart_style/dart_style.dart'; import 'package:path/path.dart' as path; import 'package:pub_semver/pub_semver.dart'; @@ -49,6 +50,7 @@ class DartOptions { this.copyrightHeader, this.sourceOutPath, this.testOutPath, + this.dartOut, bool ignoreLints = true, }) : _ignoreLints = ignoreLints; @@ -61,6 +63,9 @@ class DartOptions { /// Path to output generated Test file for tests. final String? testOutPath; + /// Path to output generated Dart file. + final String? dartOut; + /// Whether to ignore lint violations in generated Dart code. final bool _ignoreLints; @@ -72,6 +77,7 @@ class DartOptions { copyrightHeader: copyrightHeader?.cast(), sourceOutPath: map['sourceOutPath'] as String?, testOutPath: map['testOutPath'] as String?, + dartOut: map['dartOut'] as String?, ignoreLints: (map['ignoreLints'] as bool?) ?? true, ); } @@ -83,6 +89,7 @@ class DartOptions { if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, if (sourceOutPath != null) 'sourceOutPath': sourceOutPath!, if (testOutPath != null) 'testOutPath': testOutPath!, + if (dartOut != null) 'dartOut': dartOut!, 'ignoreLints': _ignoreLints, }; return result; @@ -91,10 +98,559 @@ class DartOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [DartOptions]. DartOptions merge(DartOptions options) { - return DartOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return DartOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } +abstract class _NativeInteropType> { + _NativeInteropType({required this.type, this.subTypeOne, this.subTypeTwo}); + + final TypeDeclaration type; + final T? subTypeOne; + final T? subTypeTwo; + + static T fromTypeDeclaration>( + TypeDeclaration? type, + T Function({required TypeDeclaration type, T? subTypeOne, T? subTypeTwo}) + creator, + ) { + if (type == null) { + return creator( + type: const TypeDeclaration( + baseName: 'type was null', + isNullable: false, + ), + ); + } + if (type.baseName == 'List') { + final T? subType = type.typeArguments.firstOrNull != null + ? fromTypeDeclaration(type.typeArguments.firstOrNull, creator) + : null; + return creator(type: type, subTypeOne: subType); + } else if (type.baseName == 'Map') { + final T? subTypeOne = type.typeArguments.firstOrNull != null + ? fromTypeDeclaration(type.typeArguments.firstOrNull, creator) + : null; + final T? subTypeTwo = type.typeArguments.lastOrNull != null + ? fromTypeDeclaration(type.typeArguments.lastOrNull, creator) + : null; + return creator( + type: type, + subTypeOne: subTypeOne, + subTypeTwo: subTypeTwo, + ); + } + return creator(type: type); + } + + static T fromClass>( + Class classDefinition, + T Function({required TypeDeclaration type}) creator, + ) { + final fakeType = TypeDeclaration( + baseName: classDefinition.name, + isNullable: true, + associatedClass: classDefinition, + ); + return creator(type: fakeType); + } + + static T fromEnum>( + Enum enumDefinition, + T Function({required TypeDeclaration type}) creator, + ) { + final fakeType = TypeDeclaration( + baseName: enumDefinition.name, + isNullable: true, + associatedEnum: enumDefinition, + ); + return creator(type: fakeType); + } + + bool get nonNullableNeedsUnwrapping { + if (type.isClass || + type.isEnum || + type.baseName == 'String' || + type.baseName == 'Object' || + type.baseName == 'List' || + type.baseName == 'Map' || + type.baseName == 'Uint8List' || + type.baseName == 'Int32List' || + type.baseName == 'Int64List' || + type.baseName == 'Float64List') { + return true; + } + return false; + } + + String getDartReturnType(bool forceUnwrap) { + if (forceUnwrap || type.isNullable || nonNullableNeedsUnwrapping) { + return '${type.baseName}$dartCollectionTypeAnnotations${_getNullableSymbol(type.isNullable)}'; + } + return type.baseName; + } + + String get dartCollectionTypeAnnotations { + if (type.baseName == 'List') { + return '<$dartCollectionTypes>'; + } else if (type.baseName == 'Map') { + return '<$dartCollectionTypes>'; + } + return ''; + } + + String get dartCollectionTypes { + if (type.baseName == 'List') { + return subTypeOne?.getDartReturnType(true) ?? 'Object?'; + } else if (type.baseName == 'Map') { + return '${subTypeOne?.getDartReturnType(true) ?? 'Object?'}, ${subTypeTwo?.getDartReturnType(true) ?? 'Object?'}'; + } + return ''; + } +} + +class _FfiType extends _NativeInteropType<_FfiType> { + _FfiType({required super.type, super.subTypeOne, super.subTypeTwo}); + + static _FfiType fromTypeDeclaration(TypeDeclaration? type) { + return _NativeInteropType.fromTypeDeclaration<_FfiType>(type, _FfiType.new); + } + + static _FfiType fromClass(Class classDefinition) { + return _NativeInteropType.fromClass<_FfiType>( + classDefinition, + _FfiType.new, + ); + } + + static _FfiType fromEnum(Enum enumDefinition) { + return _NativeInteropType.fromEnum<_FfiType>(enumDefinition, _FfiType.new); + } + + String get ffiName { + switch (type.baseName) { + case 'String': + return 'NSString'; + case 'void': + return 'NSVoid'; + case 'bool': + case 'int': + case 'double': + return 'NSNumber'; + case 'Uint8List': + return 'ffi_bridge.${_classNamePrefix}PigeonTypedData'; + case 'Int32List': + return 'ffi_bridge.${_classNamePrefix}PigeonTypedData'; + case 'Int64List': + return 'ffi_bridge.${_classNamePrefix}PigeonTypedData'; + case 'Float64List': + return 'ffi_bridge.${_classNamePrefix}PigeonTypedData'; + case 'Object': + return 'NSObject'; + case 'List': + return 'NSMutableArray'; + case 'Map': + return 'NSDictionary'; + default: + { + if (type.isClass) { + final bridge = type.isClass ? 'Bridge' : ''; + return 'ffi_bridge.${type.baseName}$bridge'; + } + if (type.isEnum) { + return 'NSNumber'; + } + return 'There is something wrong, a type is not classified'; + } + } + } + + String get fullFfiName { + if (type.baseName == 'List' || type.baseName == 'Map') { + return ffiName; + } + return ffiName; + } + + String get primitiveToDartMethodName { + switch (type.baseName) { + case 'String': + return 'toDartString()'; + case 'int': + return 'longValue'; + case 'double': + return 'doubleValue'; + case 'bool': + return 'boolValue'; + default: + return ''; + } + } + + String getToDartCall( + TypeDeclaration type, { + String varName = '', + bool forceConversion = false, + bool classField = false, + bool forceNullable = false, + }) { + if (type.isClass) { + return '${type.baseName}.fromFfi($varName)${_getForceNonNullSymbol(!type.isNullable)}'; + } + if (type.isEnum && classField) { + if (type.isNullable) { + return _wrapInNullCheckIfNullable( + nullable: type.isNullable, + varName: varName, + code: + '${type.baseName}.values[$varName${_getForceNonNullSymbol(type.isNullable)}.longValue]', + ); + } + return '${type.baseName}.values[$varName.index]'; + } + var asType = ' as ${getDartReturnType(true)}'; + var castCall = ''; + String getHint(TypeDeclaration type) { + if (type.isEnum || + type.baseName == 'double' || + type.baseName == 'bool' || + type.baseName == 'int') { + return type.baseName; + } + return 'null'; + } + + final String type1Hint = type.isEnum + ? type.baseName + : type.typeArguments.isNotEmpty + ? getHint(type.typeArguments.first) + : 'null'; + final String type2Hint = type.typeArguments.length > 1 + ? getHint(type.typeArguments.last) + : 'null'; + + final String typeArg; + if (type.isEnum) { + typeArg = ', ${type.baseName}'; + } else if (type2Hint != 'null') { + typeArg = ', $type1Hint, $type2Hint'; + } else if (type1Hint != 'null') { + typeArg = ', $type1Hint'; + } else { + typeArg = ''; + } + + final codecCall = + '_PigeonFfiCodec.readValue($varName$typeArg)${_getForceNonNullSymbol(!type.isNullable)}'; + String primitiveGetter(String converter, bool classField) { + return classField && + !type.isNullable && + (type.baseName == 'int' || + type.baseName == 'double' || + type.baseName == 'bool') + ? varName + : '$varName${type.isNullable ? '?' : (forceNullable ? '!' : '')}.$converter'; + } + + switch (type.baseName) { + case 'String': + case 'int': + case 'double': + case 'bool': + return primitiveGetter(primitiveToDartMethodName, classField); + case 'Object': + asType = ''; + case 'List': + asType = ' as List${_getNullableSymbol(type.isNullable)}'; + castCall = + '${_getNullableSymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + case 'Map': + asType = + ' as Map${_getNullableSymbol(type.isNullable)}'; + castCall = + '${_getNullableSymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + } + return '${wrapConditionally('$codecCall$asType', '(', ')', type.baseName != 'Object')}$castCall'; + } + + String getToFfiCall( + TypeDeclaration type, + String name, + _FfiType ffiType, { + bool classField = false, + bool forceNonNull = false, + }) { + if (type.isClass) { + return _wrapInNullCheckIfNullable( + nullable: type.isNullable, + varName: name, + code: + '$name${_getForceNonNullSymbol(type.isNullable && forceNonNull)}.toFfi()', + ); + } + if (type.isEnum && !type.isNullable) { + return 'ffi_bridge.${type.baseName}.values[$name]'; + } + if (!type.isNullable && + (type.baseName == 'int' || + type.baseName == 'double' || + type.baseName == 'bool')) { + return name; + } + return '_PigeonFfiCodec.writeValue<${ffiType.ffiName}${_getNullableSymbol(type.isNullable && type.baseName != 'Object')}>($name${type.baseName == 'Object' ? ', generic: true' : ''})'; + } + + String getFfiCallReturnType({ + bool forceNullable = false, + bool forceNonNullable = false, + bool withPrefix = true, + bool asyncBlockMethod = false, + }) { + final prefix = withPrefix ? 'ffi_bridge.' : ''; + if (type.baseName == 'List') { + return forceNonNullable ? 'NSArray' : 'NSArray?'; + } + if (type.baseName == 'Object') { + return 'NSObject${_getNullableSymbol((forceNullable || type.isNullable) && !forceNonNullable)}'; + } + + return '${ffiName.replaceAll('ffi_bridge.', prefix)}${_getNullableSymbol((forceNullable || type.isNullable) && !forceNonNullable)}'; + } + + String get ffiCollectionTypeAnnotations { + if (type.baseName == 'List') { + return '<$ffiCollectionTypes>'; + } else if (type.baseName == 'Map') { + return '<$ffiCollectionTypes>'; + } + return ''; + } + + String get ffiCollectionTypes { + if (type.baseName == 'List') { + return subTypeOne?.getFfiCallReturnType() ?? 'NSObject?'; + } else if (type.baseName == 'Map') { + return '${subTypeOne?.getFfiCallReturnType() ?? 'NSObject'}, ${subTypeTwo?.getFfiCallReturnType() ?? 'NSObject?'}'; + } + return ''; + } +} + +class _JniType extends _NativeInteropType<_JniType> { + _JniType({required super.type, super.subTypeOne, super.subTypeTwo}); + + static _JniType fromTypeDeclaration(TypeDeclaration? type) { + return _NativeInteropType.fromTypeDeclaration<_JniType>(type, _JniType.new); + } + + static _JniType fromClass(Class classDefinition) { + return _NativeInteropType.fromClass<_JniType>( + classDefinition, + _JniType.new, + ); + } + + static _JniType fromEnum(Enum enumDefinition) { + return _NativeInteropType.fromEnum<_JniType>(enumDefinition, _JniType.new); + } + + String get jniName { + switch (type.baseName) { + case 'String': + return 'JString'; + case 'void': + return 'JVoid'; + case 'bool': + return 'JBoolean'; + case 'int': + return 'JLong'; + case 'double': + return 'JDouble'; + case 'Uint8List': + return 'JByteArray'; + case 'Int32List': + return 'JIntArray'; + case 'Int64List': + return 'JLongArray'; + case 'Float64List': + return 'JDoubleArray'; + case 'Object': + return 'JObject'; + case 'List': + return 'JList'; + case 'Map': + return 'JMap'; + default: + { + if (type.isClass || type.isEnum) { + return 'jni_bridge.${type.baseName}'; + } + return 'There is something wrong, a type is not classified'; + } + } + } + + String get fullJniName { + if (type.baseName == 'List' || type.baseName == 'Map') { + return jniName + jniCollectionTypeAnnotations; + } + return jniName; + } + + String get primitiveToDartMethodName { + switch (type.baseName) { + case 'String': + return 'toDartString'; + case 'int': + return 'toDartInt'; + case 'double': + return 'toDartDouble'; + case 'bool': + return 'toDartBool'; + default: + return ''; + } + } + + String getToDartCall( + TypeDeclaration type, { + String varName = '', + bool forceConversion = false, + }) { + if (type.isClass || type.isEnum) { + return '${type.baseName}.fromJni($varName)${_getForceNonNullSymbol(!type.isNullable)}'; + } + var asType = ' as ${getDartReturnType(true)}'; + var castCall = ''; + final codecCall = + '_PigeonJniCodec.readValue($varName)${_getForceNonNullSymbol(!type.isNullable)}'; + String primitiveGetter(String converter, bool unwrap) { + return unwrap + ? '$varName${_getNullableSymbol(type.isNullable)}.$converter${'(releaseOriginal: true)'}' + : varName; + } + + switch (type.baseName) { + case 'String': + case 'int': + case 'double': + case 'bool': + return primitiveGetter( + primitiveToDartMethodName, + type.baseName == 'String' || type.isNullable || forceConversion, + ); + case 'Object': + asType = ''; + case 'List': + asType = ' as List${_getNullableSymbol(type.isNullable)}'; + castCall = + '${_getNullableSymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + case 'Map': + asType = + ' as Map${_getNullableSymbol(type.isNullable)}'; + castCall = + '${_getNullableSymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + } + return '${wrapConditionally('$codecCall$asType', '(', ')', type.baseName != 'Object')}$castCall'; + } + + String getToJniCall( + TypeDeclaration type, + String name, + _JniType jniType, { + bool forceNonNull = false, + }) { + if (type.isClass || type.isEnum) { + return _wrapInNullCheckIfNullable( + nullable: type.isNullable, + varName: name, + code: + '$name${_getForceNonNullSymbol(type.isNullable && forceNonNull)}.toJni()', + ); + } else if (!type.isNullable && + (type.baseName == 'int' || + type.baseName == 'double' || + type.baseName == 'bool')) { + return name; + } + return '_PigeonJniCodec.writeValue<${getJniCallReturnType(true)}>($name)'; + } + + String getJniCallReturnType( + bool forceUnwrap, { + bool isParameter = false, + bool isAsynchronous = false, + }) { + if (forceUnwrap || type.isNullable || nonNullableNeedsUnwrapping) { + return '$jniName${getJniCollectionTypeAnnotations(isParameter: isParameter, isAsynchronous: isAsynchronous)}${_getNullableSymbol(type.isNullable)}'; + } + return type.baseName; + } + + String getJniCollectionTypeAnnotations({ + bool isParameter = false, + bool isAsynchronous = false, + }) { + if (type.baseName == 'List') { + return '<${getJniCollectionTypes(isParameter: isParameter, isAsynchronous: isAsynchronous)}>'; + } else if (type.baseName == 'Map') { + return '<${getJniCollectionTypes(isParameter: isParameter, isAsynchronous: isAsynchronous)}>'; + } + return ''; + } + + String get jniCollectionTypeAnnotations => getJniCollectionTypeAnnotations(); + + String getJniCollectionTypes({ + bool isParameter = false, + bool isAsynchronous = false, + }) { + if (type.baseName == 'List') { + final String? subType = subTypeOne?.getJniCallReturnType( + true, + isParameter: isParameter, + isAsynchronous: isAsynchronous, + ); + if (subType == null) { + return 'JObject?'; + } + return isParameter && isAsynchronous && !subType.endsWith('?') + ? '$subType?' + : subType; + } else if (type.baseName == 'Map') { + final String? subType1 = subTypeOne?.getJniCallReturnType( + true, + isParameter: isParameter, + isAsynchronous: isAsynchronous, + ); + final String? subType2 = subTypeTwo?.getJniCallReturnType( + true, + isParameter: isParameter, + isAsynchronous: isAsynchronous, + ); + final String res1 = subType1 ?? 'JObject'; + final String res2 = subType2 ?? 'JObject?'; + return isParameter && isAsynchronous + ? '${res1.endsWith('?') ? res1 : '$res1?'}, ${res2.endsWith('?') ? res2 : '$res2?'}' + : '$res1, $res2'; + } + return ''; + } + + String get jniCollectionTypes => getJniCollectionTypes(); +} + +String _getNullableSymbol(bool nullable) => nullable ? '?' : ''; + +String _getForceNonNullSymbol(bool force) => force ? '!' : ''; + +String _wrapInNullCheckIfNullable({ + required bool nullable, + required String varName, + required String code, + String ifNull = 'null', +}) => nullable ? '$varName == null ? $ifNull : $code' : code; + /// Options that control how Dart code will be generated. class InternalDartOptions extends InternalOptions { /// Constructor for InternalDartOptions. @@ -102,6 +658,11 @@ class InternalDartOptions extends InternalOptions { this.copyrightHeader, this.dartOut, this.testOut, + this.fileSpecificClassNameComponent, + this.useJni = false, + this.useFfi = false, + this.ffiErrorClassName, + this.jniErrorClassName, required bool ignoreLints, }) : _ignoreLints = ignoreLints; @@ -111,6 +672,11 @@ class InternalDartOptions extends InternalOptions { Iterable? copyrightHeader, String? dartOut, String? testOut, + required this.useJni, + required this.useFfi, + this.ffiErrorClassName, + this.jniErrorClassName, + this.fileSpecificClassNameComponent, }) : copyrightHeader = copyrightHeader ?? options.copyrightHeader, dartOut = (dartOut ?? options.sourceOutPath)!, testOut = testOut ?? options.testOutPath, @@ -119,16 +685,34 @@ class InternalDartOptions extends InternalOptions { /// A copyright header that will get prepended to generated code. final Iterable? copyrightHeader; + /// A String to augment class names to avoid cross file collisions. + final String? fileSpecificClassNameComponent; + /// Path to output generated Dart file. final String? dartOut; /// Path to output generated Test file for tests. final String? testOut; + /// Whether to use Jni for generating kotlin interop code. + final bool useJni; + + /// Whether to use Ffi for generating swift interop code. + final bool useFfi; + + /// The error class name used for FFI methods. + final String? ffiErrorClassName; + + /// The error class name used for JNI methods. + final String? jniErrorClassName; + /// Whether to ignore lint violations in generated Dart code. final bool _ignoreLints; } +// Prefix used mapping prefixed class names for language outputs. +String _classNamePrefix = ''; + /// Class that manages all Dart code generation. class DartGenerator extends StructuredGenerator { /// Instantiates a Dart Generator. @@ -146,6 +730,8 @@ class DartGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + // TODO(tarrinneal): Add file constant initialization method in all generators + _classNamePrefix = generatorOptions.fileSpecificClassNameComponent ?? ''; if (generatorOptions.copyrightHeader != null) { addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); } @@ -176,13 +762,27 @@ class DartGenerator extends StructuredGenerator { required String dartPackageName, }) { indent.writeln("import 'dart:async';"); - if (root.containsProxyApi) { + if (generatorOptions.useFfi) { + indent.writeln("import 'dart:ffi';"); + } + if (usesNativeInterop(generatorOptions) || root.containsProxyApi) { indent.writeln("import 'dart:io' show Platform;"); } + + final typedDataClasses = [ + if (usesNativeInterop(generatorOptions)) 'Float32List', + 'Float64List', + 'Int32List', + 'Int64List', + if (generatorOptions.useJni) 'Int8List', + if (usesNativeInterop(generatorOptions)) 'TypedData', + ]; indent.writeln( - "import 'dart:typed_data' show Float64List, Int32List, Int64List;", + "import 'dart:typed_data' show ${typedDataClasses.join(', ')};", ); - indent.newln(); + if (generatorOptions.useFfi) { + indent.writeln("import 'package:ffi/ffi.dart';"); + } indent.writeln("import 'package:flutter/services.dart';"); if (root.containsProxyApi) { @@ -190,9 +790,26 @@ class DartGenerator extends StructuredGenerator { "import 'package:flutter/widgets.dart' show WidgetsFlutterBinding;", ); } + if (generatorOptions.useJni) { + indent.writeln("import 'package:jni/jni.dart';"); + } indent.writeln( "import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;", ); + if (generatorOptions.useFfi) { + indent.writeln("import 'package:objective_c/objective_c.dart';"); + + final String ffiFileImportName = path.basename(generatorOptions.dartOut!); + indent.writeln( + "import './${path.withoutExtension(ffiFileImportName)}.ffi.dart' as ffi_bridge;", + ); + } + if (generatorOptions.useJni) { + final String jniFileImportName = path.basename(generatorOptions.dartOut!); + indent.writeln( + "import './${path.withoutExtension(jniFileImportName)}.jni.dart' as jni_bridge;", + ); + } } @override @@ -209,15 +826,57 @@ class DartGenerator extends StructuredGenerator { anEnum.documentationComments, docCommentSpec, ); - indent.write('enum ${anEnum.name} '); - indent.addScoped('{', '}', () { + indent.addScoped('enum ${anEnum.name} {', '}', () { for (final EnumMember member in anEnum.members) { + final separatorSymbol = member == anEnum.members.last ? ';' : ','; addDocumentationComments( indent, member.documentationComments, docCommentSpec, ); - indent.writeln('${member.name},'); + indent.writeln('${member.name}$separatorSymbol'); + } + + if (generatorOptions.useJni) { + final _JniType jniType = _JniType.fromEnum(anEnum); + indent.newln(); + indent.writeScoped('${jniType.jniName} toJni() {', '}', () { + indent.writeln('return ${jniType.jniName}.Companion.ofRaw(index)!;'); + }); + + indent.newln(); + indent.writeScoped( + 'static ${anEnum.name}? fromJni(${jniType.jniName}? jniEnum) {', + '}', + () { + indent.writeln( + 'return jniEnum == null ? null : ${anEnum.name}.values[jniEnum.raw];', + ); + }, + ); + } + if (generatorOptions.useFfi) { + final _FfiType ffiType = _FfiType.fromEnum(anEnum); + indent.newln(); + indent.writeScoped('${ffiType.ffiName} toFfi() {', '}', () { + indent.writeln('return _PigeonFfiCodec.writeValue(index);'); + }); + + indent.newln(); + indent.writeScoped('NSNumber toNSNumber() {', '}', () { + indent.writeln('return NSNumber.alloc().initWithLong(index);'); + }); + + indent.newln(); + indent.writeScoped( + 'static ${anEnum.name}? fromNSNumber(NSNumber? ffiEnum) {', + '}', + () { + indent.writeln( + 'return ffiEnum == null ? null : ${anEnum.name}.values[ffiEnum.intValue];', + ); + }, + ); } }); } @@ -286,6 +945,11 @@ class DartGenerator extends StructuredGenerator { classDefinition, dartPackageName: dartPackageName, ); + indent.newln(); + indent.writeln('@override'); + indent.writeScoped('String toString() {', '}', () { + indent.write('return _toList().toString();'); + }); }); } @@ -306,6 +970,28 @@ class DartGenerator extends StructuredGenerator { }); } + @override + void writeClassEncode( + InternalDartOptions generatorOptions, + Root root, + Indent indent, + Class classDefinition, { + required String dartPackageName, + }) { + if (generatorOptions.useJni) { + _writeToJni(indent, classDefinition); + indent.newln(); + } + if (generatorOptions.useFfi) { + _writeToFfi(indent, classDefinition); + indent.newln(); + } + indent.write('Object encode() '); + indent.addScoped('{', '}', () { + indent.write('return _toList();'); + }); + } + void _writeToList(Indent indent, Class classDefinition) { indent.writeScoped('List _toList() {', '}', () { indent.writeScoped('return [', '];', () { @@ -318,20 +1004,92 @@ class DartGenerator extends StructuredGenerator { }); } - @override - void writeClassEncode( - InternalDartOptions generatorOptions, - Root root, - Indent indent, - Class classDefinition, { - required String dartPackageName, - }) { - indent.write('Object encode() '); - indent.addScoped('{', '}', () { - indent.write('return _toList();'); + void _writeToJni(Indent indent, Class classDefinition) { + indent.writeScoped('jni_bridge.${classDefinition.name} toJni() {', '}', () { + indent.writeScoped('return jni_bridge.${classDefinition.name} (', ');', () { + for (final NamedType field in getFieldsInSerializationOrder( + classDefinition, + )) { + final _JniType jniType = _JniType.fromTypeDeclaration(field.type); + indent.writeln( + '${jniType.getToJniCall(field.type, field.name, jniType, forceNonNull: true)},', + ); + } + }); + }); + } + + void _writeToFfi(Indent indent, Class classDefinition) { + final _FfiType ffiClass = _FfiType.fromClass(classDefinition); + indent.writeScoped('${ffiClass.ffiName} toFfi() {', '}', () { + final Iterable fields = getFieldsInSerializationOrder( + classDefinition, + ); + indent.writeScoped( + 'return ${ffiClass.ffiName}.alloc().initWith${toUpperCamelCase(fields.first.name)}(', + ');', + () { + var needsName = false; + for (final field in fields) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(field.type); + indent.writeln( + '${needsName ? '${field.name}: ' : ''}${ffiType.getToFfiCall(field.type, '${field.name}${ffiType.type.isEnum ? '${_getNullableSymbol(ffiType.type.isNullable)}.index' : ''}', ffiType, forceNonNull: true, classField: true)},', + ); + needsName = true; + } + }, + ); }); } + void _writeFromJni(Indent indent, Class classDefinition) { + final _JniType jniClass = _JniType.fromClass(classDefinition); + indent.writeScoped( + 'static ${jniClass.type.baseName}? fromJni(${jniClass.jniName}? jniClass) {', + '}', + () { + indent.writeScoped( + 'return jniClass == null ? null : ${jniClass.type.baseName}(', + ');', + () { + for (final NamedType field in getFieldsInSerializationOrder( + classDefinition, + )) { + final _JniType jniType = _JniType.fromTypeDeclaration(field.type); + indent.writeln( + '${field.name}: ${jniType.getToDartCall(field.type, varName: 'jniClass.${field.name}')},', + ); + } + }, + ); + }, + ); + } + + void _writeFromFfi(Indent indent, Class classDefinition) { + final _FfiType ffiClass = _FfiType.fromClass(classDefinition); + indent.writeScoped( + 'static ${ffiClass.type.baseName}? fromFfi(${ffiClass.ffiName}? ffiClass) {', + '}', + () { + indent.writeScoped( + 'return ffiClass == null ? null : ${ffiClass.type.baseName}(', + ');', + () { + for (final NamedType field in getFieldsInSerializationOrder( + classDefinition, + )) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(field.type); + indent.writeln( + '${field.name}: ${ffiType.getToDartCall(field.type, varName: 'ffiClass.${field.name}', classField: true)},', + ); + } + }, + ); + }, + ); + } + @override void writeClassDecode( InternalDartOptions generatorOptions, @@ -340,21 +1098,33 @@ class DartGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { - indent.write('static ${classDefinition.name} decode(Object result) '); - indent.addScoped('{', '}', () { - indent.writeln('result as List;'); - indent.write('return ${classDefinition.name}'); - indent.addScoped('(', ');', () { - enumerate(getFieldsInSerializationOrder(classDefinition), ( - int index, - final NamedType field, - ) { - indent.write('${field.name}: '); - indent.add(_castValue('result[$index]', field.type)); - indent.addln(','); + if (generatorOptions.useJni) { + _writeFromJni(indent, classDefinition); + indent.newln(); + } + if (generatorOptions.useFfi) { + _writeFromFfi(indent, classDefinition); + indent.newln(); + } + + indent.writeScoped( + 'static ${classDefinition.name} decode(Object result) {', + '}', + () { + indent.writeln('result as List;'); + indent.write('return ${classDefinition.name}'); + indent.addScoped('(', ');', () { + enumerate(getFieldsInSerializationOrder(classDefinition), ( + int index, + final NamedType field, + ) { + indent.write('${field.name}: '); + indent.add(_castValue('result[$index]', field.type)); + indent.addln(','); + }); }); - }); - }); + }, + ); } @override @@ -536,6 +1306,256 @@ class DartGenerator extends StructuredGenerator { } } + void _writeNIFlutterApi( + InternalDartOptions generatorOptions, + Root root, + Indent indent, + AstFlutterApi api, { + required String dartPackageName, + }) { + final mixin = generatorOptions.useJni + ? ' with jni_bridge.\$${api.name}' + : ''; + indent.writeScoped('final class ${api.name}Registrar$mixin {', '}', () { + indent.writeln('${api.name}? dartApi;'); + indent.newln(); + indent.writeScoped('${api.name} register(', ') ', () { + indent.writeScoped('${api.name} api, {', '}', () { + indent.writeln('String name = defaultInstanceName,'); + }, nestCount: 0); + }, addTrailingNewline: false); + indent.addScoped('{', '}', () { + indent.writeln('dartApi = api;'); + indent.newln(); + if (generatorOptions.useJni) { + indent.writeScoped('if (Platform.isAndroid) {', '}', () { + indent.writeln( + 'final jni_bridge.${api.name} impl = jni_bridge.${api.name}.implement(this);', + ); + indent.writeln( + 'jni_bridge.${api.name}Registrar().registerInstance(', + ); + indent.writeln(' impl,'); + indent.writeln(' name.toJString(),'); + indent.writeln(');'); + }); + } + if (generatorOptions.useFfi) { + indent.writeScoped('if (Platform.isIOS || Platform.isMacOS) {', '}', () { + indent.newln(); + indent.writeln( + "final ObjCProtocolBuilder builder = ObjCProtocolBuilder(debugName: '${api.name}Bridge');", + ); + for (final Method method in api.methods) { + final registrationMethod = method.isAsynchronous + ? 'implementAsListener' + : 'implement'; + indent.writeScoped( + 'ffi_bridge.${api.name}Bridge\$Builder.${_getFfiCallbackName(method)}.$registrationMethod(builder, (${_getFfiCallbackArgSignature(method, generatorOptions)}) {', + '});', + () { + indent.writeScoped('try {', '}', () { + indent.writeScoped('if (dartApi != null) {', '}', () { + final methodCall = + 'dartApi!.${method.name}(${method.parameters.map((p) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(p.type); + return ffiType.getToDartCall(p.type, varName: p.name, forceNullable: true); + }).join(', ')})'; + if (method.isAsynchronous) { + indent.writeScoped('$methodCall.then((response) {', '},', () { + if (method.returnType.isVoid) { + indent.writeln( + 'ffi_bridge.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call();', + ); + } else { + final _FfiType ffiReturnType = + _FfiType.fromTypeDeclaration(method.returnType); + String toFfiCall; + if (!method.returnType.isNullable && + (method.returnType.baseName == 'int' || + method.returnType.baseName == 'double' || + method.returnType.baseName == 'bool' || + method.returnType.isEnum)) { + toFfiCall = + '_PigeonFfiCodec.writeValue<${ffiReturnType.ffiName}>(response)'; + } else { + toFfiCall = ffiReturnType.getToFfiCall( + method.returnType, + 'response', + ffiReturnType, + ); + } + indent.writeln( + 'ffi_bridge.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call($toFfiCall);', + ); + } + }); + indent.writeScoped('onError: (Object e) {', '});', () { + indent.writeln('_reportFfiError(errorOut, e);'); + if (method.returnType.isVoid) { + indent.writeln( + 'ffi_bridge.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call();', + ); + } else { + indent.writeln( + 'ffi_bridge.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call(null);', + ); + } + }); + indent.writeln('return;'); + } else { + if (method.returnType.isVoid) { + indent.writeln('$methodCall;'); + indent.writeln('return;'); + } else { + final _FfiType ffiReturnType = + _FfiType.fromTypeDeclaration(method.returnType); + indent.writeln( + 'final ${addGenericTypes(method.returnType)} response = $methodCall;', + ); + String toFfiCall; + if (!method.returnType.isNullable && + (method.returnType.baseName == 'int' || + method.returnType.baseName == 'double' || + method.returnType.baseName == 'bool' || + method.returnType.isEnum)) { + toFfiCall = + '_PigeonFfiCodec.writeValue<${ffiReturnType.ffiName}>(response)'; + } else { + toFfiCall = ffiReturnType.getToFfiCall( + method.returnType, + 'response', + ffiReturnType, + ); + } + indent.writeln('return $toFfiCall;'); + } + } + }, addTrailingNewline: false); + indent.addScoped(' else {', '}', () { + indent.writeln( + "_reportFfiError(errorOut, 'ArgumentError: ${api.name} was not registered.');", + ); + if (method.isAsynchronous) { + indent.writeln( + 'ffi_bridge.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call(${method.returnType.isVoid ? '' : 'null'});', + ); + } + indent.writeln( + 'return${(method.isAsynchronous || method.returnType.isVoid) ? '' : ' null'};', + ); + }); + }, addTrailingNewline: false); + indent.addScoped(' catch (e) {', '}', () { + indent.writeln('_reportFfiError(errorOut, e);'); + if (method.isAsynchronous) { + indent.writeln( + 'ffi_bridge.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call(${method.returnType.isVoid ? '' : 'null'});', + ); + } + indent.writeln( + 'return${(method.isAsynchronous || method.returnType.isVoid) ? '' : ' null'};', + ); + }); + }, + ); + } + indent.writeln( + 'builder.addProtocol(ffi_bridge.${api.name}Bridge\$Builder.\$protocol);', + ); + indent.writeln( + 'final ffi_bridge.${api.name}Bridge impl = ffi_bridge.${api.name}Bridge.as(builder.build());', + ); + indent.writeln( + 'ffi_bridge.${api.name}Registrar.registerInstanceWithApi(', + ); + indent.writeln(' impl,'); + indent.writeln(' name: NSString(name),'); + indent.writeln(');'); + }); + } + indent.writeln('return api;'); + }); + + if (generatorOptions.useJni) { + for (final Method method + in root.apis + .whereType() + .expand((a) => a.methods) + .where((m) => api.methods.contains(m))) { + indent.newln(); + indent.writeln('@override'); + final _JniType jniReturnType = _JniType.fromTypeDeclaration( + method.returnType, + ); + final String returnType = method.isAsynchronous + ? 'Future<${method.returnType.isVoid ? 'JObject' : jniReturnType.getJniCallReturnType(true)}>' + : jniReturnType.getJniCallReturnType(false); + final String params = _getMethodParameterSignature( + method.parameters, + useJni: true, + isAsynchronous: method.isAsynchronous, + ); + indent.writeScoped('$returnType ${method.name}($params) {', '}', () { + indent.writeScoped('if (dartApi != null) {', '} ', () { + final methodCall = + 'dartApi!.${method.name}(${method.parameters.map((p) { + final _JniType jniType = _JniType.fromTypeDeclaration(p.type); + return jniType.getToDartCall(p.type, varName: p.name); + }).join(', ')})'; + + if (method.isAsynchronous) { + indent.writeScoped( + 'return $methodCall.then((response) {', + '});', + () { + if (method.returnType.isVoid) { + indent.writeln('return _PigeonJniCodec._kotlinUnit;'); + } else { + String toJniCall; + if (!method.returnType.isNullable && + (method.returnType.baseName == 'int' || + method.returnType.baseName == 'double' || + method.returnType.baseName == 'bool')) { + toJniCall = + '_PigeonJniCodec.writeValue<${jniReturnType.jniName}>(response)'; + } else { + toJniCall = jniReturnType.getToJniCall( + method.returnType, + 'response', + jniReturnType, + ); + } + indent.writeln('return $toJniCall;'); + } + }, + ); + } else if (method.returnType.isVoid) { + indent.writeln('$methodCall;'); + indent.writeln('return;'); + } else { + indent.writeln( + 'final ${addGenericTypes(method.returnType)} response = $methodCall;', + ); + final String toJniCall = jniReturnType.getToJniCall( + method.returnType, + 'response', + jniReturnType, + ); + indent.writeln('return $toJniCall;'); + } + }); + indent.writeScoped('else {', '}', () { + indent.writeln( + "throw ArgumentError('${api.name} was not registered.');", + ); + }); + }); + } + } + }); + } + /// Writes the code for host [Api], [api]. /// Example: /// ```dart @@ -559,6 +1579,15 @@ class DartGenerator extends StructuredGenerator { }) { indent.newln(); addDocumentationComments(indent, api.documentationComments, docCommentSpec); + if (usesNativeInterop(generatorOptions)) { + _writeNIFlutterApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + } indent.write('abstract class ${api.name} '); indent.addScoped('{', '}', () { @@ -588,10 +1617,31 @@ class DartGenerator extends StructuredGenerator { indent.writeln('$returnType ${func.name}($argSignature);'); indent.newln(); } - indent.write( - "static void setUp(${api.name}? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) ", - ); + indent.format(''' + static void setUp(${api.name}? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) '''); + indent.addScoped('{', '}', () { + if (generatorOptions.useJni) { + indent.format(''' + if (Platform.isAndroid && api != null) { + ${api.name}Registrar().register(api, name: messageChannelSuffix.isEmpty + ? defaultInstanceName + : messageChannelSuffix); + } + '''); + } + if (generatorOptions.useFfi) { + indent.format(''' + if ((Platform.isIOS || Platform.isMacOS) && api != null) { + ${api.name}Registrar().register(api, name: messageChannelSuffix.isEmpty + ? defaultInstanceName + : messageChannelSuffix); + } + '''); + } indent.writeln( r"messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';", ); @@ -611,9 +1661,314 @@ class DartGenerator extends StructuredGenerator { ); } }); + if (usesNativeInterop(generatorOptions)) { + indent.format(''' + static ${api.name} implement(${api.name} api, { + String name = '', + }) { + return ${api.name}Registrar().register(api, name: name); + } + '''); + } + }); + } + + @override + void writeApis( + InternalDartOptions generatorOptions, + Root root, + Indent indent, { + required String dartPackageName, + }) { + if (usesNativeInterop(generatorOptions)) { + indent.writeln( + "const String defaultInstanceName = 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u';", + ); + } + super.writeApis( + generatorOptions, + root, + indent, + dartPackageName: dartPackageName, + ); + } + + void _writeNativeInteropHostApi( + InternalDartOptions generatorOptions, + Root root, + Indent indent, + AstHostApi api, { + required String dartPackageName, + }) { + final dartApiName = '${api.name}ForNativeInterop'; + final jniApiRegistrarName = 'jni_bridge.${api.name}Registrar'; + final ffiApiRegistrarName = 'ffi_bridge.${api.name}Setup'; + indent.newln(); + indent.writeScoped('class $dartApiName {', '}', () { + indent.format(''' + $dartApiName._withRegistrar({$jniApiRegistrarName? jniApi, $ffiApiRegistrarName? ffiApi}) : _jniApi = jniApi, _ffiApi = ffiApi; + + /// Returns instance of $dartApiName with specified [channelName] if one has been registered. + static $dartApiName? getInstance({String channelName = defaultInstanceName}) { + late $dartApiName res; + if (Platform.isAndroid) { + final $jniApiRegistrarName? link = + $jniApiRegistrarName().getInstance(channelName.toJString()); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = $dartApiName._withRegistrar(jniApi: link); + } else if (Platform.isIOS || Platform.isMacOS) { + final $ffiApiRegistrarName? link = + $ffiApiRegistrarName.getInstanceWithName(NSString(channelName)); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = $dartApiName._withRegistrar(ffiApi: link); + } + return res; + } + + late final $jniApiRegistrarName? _jniApi; + late final $ffiApiRegistrarName? _ffiApi; +'''); + for (final Method method in api.methods) { + indent.writeScoped( + '${method.isAsynchronous ? 'Future<' : ''}${addGenericTypes(method.returnType)}${method.isAsynchronous ? '>' : ''} ${method.name}(${_getMethodParameterSignature(method.parameters)}) ${method.isAsynchronous ? 'async ' : ''}{', + '}', + () { + indent.writeScoped('try {', '}', () { + indent.writeScoped('if (_jniApi != null) {', '}', () { + final _JniType returnType = _JniType.fromTypeDeclaration( + method.returnType, + ); + final methodCallReturnString = + returnType.type.baseName == 'void' && method.isAsynchronous + ? '' + : (!returnType.nonNullableNeedsUnwrapping && + !method.returnType.isNullable && + !method.isAsynchronous) + ? 'return ' + : 'final ${returnType.getJniCallReturnType(method.isAsynchronous)} res = '; + indent.writeln( + '$methodCallReturnString${method.isAsynchronous ? 'await ' : ''}_jniApi.${method.name}(${_getJniMethodCallArguments(method.parameters)});', + ); + if ((method.returnType.isNullable || + method.isAsynchronous || + returnType.nonNullableNeedsUnwrapping) && + returnType.type.baseName != 'void') { + indent.writeln( + 'final ${returnType.getDartReturnType(method.isAsynchronous)} dartTypeRes = ${returnType.getToDartCall(method.returnType, varName: 'res', forceConversion: method.isAsynchronous)};', + ); + indent.writeln('return dartTypeRes;'); + } + }, addTrailingNewline: false); + indent.addScoped(' else if (_ffiApi != null) {', '}', () { + final _FfiType returnType = _FfiType.fromTypeDeclaration( + method.returnType, + ); + final methodCallReturnString = + returnType.type.isVoid || method.isAsynchronous + ? '' + : 'final ${returnType.getFfiCallReturnType(forceNullable: true)} res = '; + indent.writeln( + 'final error = ffi_bridge.${generatorOptions.ffiErrorClassName}();', + ); + final forceRes = + !returnType.type.isNullable && + (returnType.type.baseName == 'int' || + returnType.type.baseName == 'double' || + returnType.type.baseName == 'String' || + returnType.type.baseName == 'bool') + ? '!' + : ''; + if (method.isAsynchronous) { + indent.format(''' + final Completer<${method.returnType.getFullName()}> completer = Completer<${method.returnType.getFullName()}>(); + _ffiApi.${_getFfiMethodCallName(method)}( + ${method.parameters.isEmpty ? '' : '${_getFfiMethodCallArguments(method.parameters)},\nwrappedError: '}error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid${method.returnType.isVoid ? '' : '_${returnType.getFfiCallReturnType(withPrefix: false, asyncBlockMethod: true).replaceAll('?', '')}'}.listener( + (${method.returnType.isVoid ? '' : '${returnType.getFfiCallReturnType(forceNullable: true)} res'}) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(${method.returnType.isVoid ? '' : returnType.getToDartCall(method.returnType, varName: 'res$forceRes', forceConversion: true)}); + } + }, + ), + ); + return await completer.future; + '''); + } else { + indent.writeln( + '$methodCallReturnString _ffiApi.${_getFfiMethodCallName(method)}(${_getFfiMethodCallArguments(method.parameters)}${method.parameters.isEmpty ? '' : ', wrappedError: '}error);', + ); + indent.writeln('_throwIfFfiError(error);'); + if (!returnType.type.isVoid) { + indent.writeln( + 'final ${returnType.getDartReturnType(method.isAsynchronous)} dartTypeRes = ${returnType.getToDartCall(method.returnType, varName: 'res$forceRes')};', + ); + indent.writeln('return dartTypeRes;'); + } else { + indent.writeln('return;'); + } + } + }, addTrailingNewline: false); + indent.addScoped(' else {', '}', () { + indent.writeln( + "throw Exception('No JNI or FFI api available');", + ); + }); + }, addTrailingNewline: false); + indent.addScoped(' on JThrowable catch (e) {', '}', () { + indent.writeln('throw _wrapJniException(e);'); + }); + }, + ); + indent.newln(); + } }); } + String _getFfiMethodCallName(Method method) { + return '${method.name}${method.parameters.isNotEmpty ? 'With${toUpperCamelCase(method.parameters.first.name)}' : 'WithWrappedError'}'; + } + + String _getJniMethodCallArguments(Iterable parameters) { + return parameters + .map((Parameter parameter) { + final _JniType jniType = _JniType.fromTypeDeclaration(parameter.type); + return jniType.getToJniCall(parameter.type, parameter.name, jniType); + }) + .join(', '); + } + + String _getFfiCallbackName(Method method) { + if (method.parameters.isEmpty) { + return '${method.name}WithError_${method.isAsynchronous ? 'completionHandler_' : ''}'; + } + var name = + '${method.name}With${toUpperCamelCase(method.parameters.first.name)}'; + for (final Parameter parameter in method.parameters.skip(1)) { + name += '_${parameter.name}'; + } + final errorSuffix = method.isAsynchronous + ? '_error_completionHandler_' + : '_error_'; + return '$name$errorSuffix'; + } + + String _getFfiCallbackArgSignature( + Method method, + InternalDartOptions generatorOptions, + ) { + final List args = []; + for (final Parameter parameter in method.parameters) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(parameter.type); + final String type = ffiType.getFfiCallReturnType(forceNullable: true); + args.add('$type ${parameter.name}'); + } + args.add('ffi_bridge.${generatorOptions.ffiErrorClassName} errorOut'); + if (method.isAsynchronous) { + final _FfiType ffiReturnType = _FfiType.fromTypeDeclaration( + method.returnType, + ); + final String returnType = ffiReturnType.getFfiCallReturnType( + forceNullable: true, + ); + args.add( + 'ObjCBlock completionHandler', + ); + } + return args.join(', '); + } + + void _writeErrorHelpers(Indent indent, InternalDartOptions generatorOptions) { + if (generatorOptions.useFfi) { + indent.format(''' + void _throwIfFfiError(ffi_bridge.${generatorOptions.ffiErrorClassName} error) { + if (error.code != null) { + throw _wrapFfiError(error); + } + } + + PlatformException _wrapFfiError(ffi_bridge.${generatorOptions.ffiErrorClassName} error) => + PlatformException( + code: error.code!.toDartString(), + message: error.message?.toDartString(), + details: NSString.isA(error.details) + ? error.details!.toDartString() + : error.details, + ); + + void _reportFfiError(ffi_bridge.${generatorOptions.ffiErrorClassName} errorOut, Object e) { + if (e is PlatformException) { + errorOut.code = NSString(e.code); + errorOut.message = NSString(e.message ?? ''); + errorOut.details = NSString((e.details ?? '').toString()); + } else { + errorOut.code = NSString('error'); + errorOut.message = NSString(e.toString()); + errorOut.details = null; + } + } +'''); + } + if (generatorOptions.useJni) { + indent.format(''' + PlatformException _wrapJniException(JThrowable e) { + if (e.isA(jni_bridge.${generatorOptions.jniErrorClassName}.type)) { + final jni_bridge.${generatorOptions.jniErrorClassName} pigeonError = e.as(jni_bridge.${generatorOptions.jniErrorClassName}.type); + return PlatformException( + code: pigeonError.code.toDartString(), + message: pigeonError.message?.toDartString(), + details: pigeonError.details?.isA(JString.type) ?? false + ? pigeonError.details!.as(JString.type).toDartString() + : pigeonError.details, + stacktrace: e.javaStackTrace, + ); + } + return PlatformException( + code: 'PlatformException', + message: e.message, + details: e, + stacktrace: e.javaStackTrace, + ); + } +'''); + } + } + + String _getFfiBlockCallExtensionName(TypeDeclaration type) { + if (type.isVoid) { + return r'ObjCBlock_ffiVoid$CallExtension'; + } + final _FfiType ffiType = _FfiType.fromTypeDeclaration(type); + final String returnType = ffiType.getFfiCallReturnType( + forceNullable: true, + withPrefix: false, + ); + return 'ObjCBlock_ffiVoid_${returnType.replaceAll('?', '')}\$CallExtension'; + } + + String _getFfiMethodCallArguments(Iterable parameters) { + var needsName = false; + return parameters + .map((Parameter parameter) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(parameter.type); + final String argument = + (needsName ? '${parameter.name}: ' : '') + + ffiType.getToFfiCall( + parameter.type, + '${parameter.name}${(parameter.type.isEnum && !parameter.type.isNullable) ? '.index' : ''}', + ffiType, + ); + needsName = true; + return argument; + }) + .join(', '); + } + /// Writes the code for host [Api], [api]. /// Example: /// ```dart @@ -641,33 +1996,79 @@ class DartGenerator extends StructuredGenerator { AstHostApi api, { required String dartPackageName, }) { + if (usesNativeInterop(generatorOptions)) { + _writeNativeInteropHostApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + } indent.newln(); - var first = true; addDocumentationComments(indent, api.documentationComments, docCommentSpec); indent.write('class ${api.name} '); indent.addScoped('{', '}', () { indent.format(''' -/// Constructor for [${api.name}]. The [binaryMessenger] named argument is -/// available for dependency injection. If it is left null, the default +/// Constructor for [${api.name}]. The [binaryMessenger] named argument is +/// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. -${api.name}({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) +${api.name}({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + ${usesNativeInterop(generatorOptions) ? '${api.name}ForNativeInterop? nativeInteropApi,\n' : ''}}) : ${varNamePrefix}binaryMessenger = binaryMessenger, - ${varNamePrefix}messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.\$messageChannelSuffix' : ''; -final BinaryMessenger? ${varNamePrefix}binaryMessenger; + ${varNamePrefix}messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.\$messageChannelSuffix' : ''${usesNativeInterop(generatorOptions) ? ',\n_nativeInteropApi = nativeInteropApi;\n' : ';'} '''); + if (usesNativeInterop(generatorOptions)) { + indent.format(''' + /// Creates an instance of [${api.name}] that requests an instance of + /// [${api.name}ForNativeInterop] from the host platform with a matching instance name + /// to [messageChannelSuffix] or the default instance. + /// + /// Throws [ArgumentError] if no matching instance can be found. + factory ${api.name}.createWithNativeInteropApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + ${api.name}ForNativeInterop? nativeInteropApi; + String nativeInteropApiInstanceName = ''; + if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) { + if (messageChannelSuffix.isEmpty) { + nativeInteropApi = ${api.name}ForNativeInterop.getInstance(); + } else { + nativeInteropApiInstanceName = messageChannelSuffix; + nativeInteropApi = ${api.name}ForNativeInterop.getInstance( + channelName: messageChannelSuffix); + } + } + if (nativeInteropApi == null) { + throw ArgumentError( + 'No ${api.name} instance with \${nativeInteropApiInstanceName.isEmpty ? 'no ' : ''} instance name \${nativeInteropApiInstanceName.isNotEmpty ? '"\$nativeInteropApiInstanceName" ' : ''}found.'); + } + return ${api.name}( + binaryMessenger: binaryMessenger, + messageChannelSuffix: messageChannelSuffix, + nativeInteropApi: nativeInteropApi, + ); + } + '''); + } + + indent.writeln('final BinaryMessenger? ${varNamePrefix}binaryMessenger;'); indent.writeln( 'static const MessageCodec $pigeonChannelCodec = $_pigeonMessageCodec();', ); indent.newln(); indent.writeln('final String $_suffixVarName;'); indent.newln(); + if (usesNativeInterop(generatorOptions)) { + indent.writeln('final ${api.name}ForNativeInterop? _nativeInteropApi;'); + } for (final Method func in api.methods) { - if (!first) { - indent.newln(); - } else { - first = false; - } + indent.newln(); + _writeHostMethod( indent, name: func.name, @@ -676,6 +2077,8 @@ final BinaryMessenger? ${varNamePrefix}binaryMessenger; documentationComments: func.documentationComments, channelName: makeChannelName(api, func, dartPackageName), addSuffixVariable: true, + useJni: generatorOptions.useJni, + useFfi: generatorOptions.useFfi, ); } }); @@ -1162,6 +2565,475 @@ final BinaryMessenger? ${varNamePrefix}binaryMessenger; proxyApis: root.apis.whereType(), ); } + if (usesNativeInterop(generatorOptions)) { + if (generatorOptions.useJni) { + _writeJniCodec(indent, root); + } + if (generatorOptions.useFfi) { + _writeFfiCodec(indent, root); + _writeConvertNumberWrapper(indent, root); + } + + indent.writeln('bool isType(Type t) => T == t;'); + + indent.writeln( + 'bool isTypeOrNullableType(Type t) => isType(t) || isType(t);', + ); + indent.newln(); + indent.format(r''' + void _throwNoInstanceError(String channelName) { + String nameString = 'named $channelName'; + if (channelName == defaultInstanceName) { + nameString = 'with no name'; + } + final String error = 'No instance $nameString has been registered.'; + throw ArgumentError(error); + } +'''); + _writeErrorHelpers(indent, generatorOptions); + indent.newln(); + } + } + + void _writeJniCodec(Indent indent, Root root) { + indent.newln(); + indent.format(''' +class _PigeonJniCodec { + static JObject get _kotlinUnit { + final JClass unitClass = JClass.forName('kotlin/Unit'); + try { + return unitClass + .staticFieldId('INSTANCE', 'Lkotlin/Unit;') + .get(unitClass, JObject.type); + } finally { + unitClass.release(); + } + } + + static Object? readValue(JObject? value) { + if (value == null) { + return null; + } + if (value.isA(JLong.type)) { + return (value.as(JLong.type)).longValue(); + } else if (value.isA(JDouble.type)) { + return (value.as(JDouble.type)).doubleValue(); + } else if (value.isA(JString.type)) { + return (value.as(JString.type)).toDartString(); + } else if (value.isA(JBoolean.type)) { + return (value.as(JBoolean.type)).booleanValue(); + } else if (value.isA(JByteArray.type)) { + final JByteArray array = value.as(JByteArray.type); + return array.getRange(0, array.length).buffer.asUint8List(); + } else if (value.isA(JIntArray.type)) { + final JIntArray array = value.as(JIntArray.type); + return array.getRange(0, array.length); + } else if (value.isA(JLongArray.type)) { + final JLongArray array = value.as(JLongArray.type); + return array.getRange(0, array.length); + } else if (value.isA(JDoubleArray.type)) { + final JDoubleArray array = value.as(JDoubleArray.type); + return array.getRange(0, array.length); + } else if (value.isA>(JList.type as JType>)) { + final List list = value.as(JList.type).asDart(); + final res = []; + // Cache the length before iterating to avoid a JNI hop per iteration. + final int len = list.length; + for (int i = 0; i < len; i++) { + res.add(readValue(list[i])); + } + return res; + } else if (value.isA>( + JMap.type as JType>)) { + final Map map = + value.as(JMap.type).asDart(); + final res = {}; + for (final MapEntry entry in map.entries) { + res[readValue(entry.key)] = readValue(entry.value); + } + return res; + ${root.classes.map((Class dataClass) { + final _JniType jniType = _JniType.fromClass(dataClass); + return ''' + } else if (value.isA<${jniType.jniName}>( + ${jniType.jniName}.type)) { + return ${jniType.type.baseName}.fromJni(value.as(${jniType.jniName}.type)); + '''; + }).join()} + ${root.enums.map((Enum enumDefinition) { + final _JniType jniType = _JniType.fromEnum(enumDefinition); + return ''' + } else if (value.isA<${jniType.jniName}>( + ${jniType.jniName}.type)) { + return ${jniType.type.baseName}.fromJni(value.as(${jniType.jniName}.type)); + '''; + }).join()} + } else { + throw ArgumentError.value(value); + } + } + + static T writeValue(Object? value) { + if (value == null) { + return null as T; + } + if (value is bool) { + return JBoolean(value) as T; + } else if (value is double) { + return JDouble(value) as T; + // ignore: avoid_double_and_int_checks + } else if (value is int) { + return JLong(value) as T; + } else if (value is String) { + return value.toJString() as T; + } else if (value is Uint8List) { + final JByteArray array = JByteArray(value.length); + array.setRange(0, value.length, Int8List.view(value.buffer, value.offsetInBytes, value.length)); + return array as T; + } else if (value is Int32List) { + final JIntArray array = JIntArray(value.length); + array.setRange(0, value.length, value); + return array as T; + } else if (value is Int64List) { + final JLongArray array = JLongArray(value.length); + array.setRange(0, value.length, value); + return array as T; + } else if (value is Float64List) { + final JDoubleArray array = JDoubleArray(value.length); + array.setRange(0, value.length, value); + return array as T; + ${root.lists.values.sorted(sortByObjectCount).map((TypeDeclaration list) { + if (list.typeArguments.isEmpty || list.typeArguments.first.baseName == 'Object') { + return ''; + } + final _JniType jniType = _JniType.fromTypeDeclaration(list); + return ''' + } else if (value is ${jniType.type.getFullName(withNullable: false)}) { + return value + .map<${jniType.subTypeOne?.fullJniName ?? 'JObject'}${jniType.subTypeOne?.type.isNullable ?? true ? '?' : ''}>((e) => writeValue<${jniType.subTypeOne?.fullJniName ?? 'JObject'}${jniType.subTypeOne?.type.isNullable ?? true ? '?' : ''}>(e)) + .toJList() as T; + '''; + }).join()} + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + ${root.maps.entries.sorted((MapEntry a, MapEntry b) => sortByObjectCount(a.value, b.value)).map((MapEntry mapType) { + if (mapType.value.typeArguments.isEmpty || (mapType.value.typeArguments.first.baseName == 'Object' && mapType.value.typeArguments.last.baseName == 'Object')) { + return ''; + } + final _JniType jniType = _JniType.fromTypeDeclaration(mapType.value); + return ''' + } else if (value is ${jniType.type.getFullName(withNullable: false)}) { + return value + .map<${jniType.subTypeOne?.fullJniName ?? 'JObject'}${jniType.subTypeOne?.type.isNullable ?? true ? '?' : ''}, ${jniType.subTypeTwo?.fullJniName ?? 'JObject'}${jniType.subTypeTwo?.type.isNullable ?? true ? '?' : ''}>( + (k, v) => MapEntry(writeValue<${jniType.subTypeOne?.fullJniName ?? 'JObject'}${jniType.subTypeOne?.type.isNullable ?? true ? '?' : ''}>(k), writeValue<${jniType.subTypeTwo?.fullJniName ?? 'JObject'}${jniType.subTypeTwo?.type.isNullable ?? true ? '?' : ''}>(v))) + .toJMap() as T; + '''; + }).join()} + } else if (value is Map) { + return value + .map((k, v) => + MapEntry(writeValue(k), writeValue(v))) + .toJMap() as T; + } else if (value is Map) { + return value + .map((k, v) => + MapEntry(writeValue(k), writeValue(v))) + .toJMap() as T; + } else if (value is Map) { + return value + .map((k, v) => + MapEntry(writeValue(k), writeValue(v))) + .toJMap() as T; + ${root.classes.map((Class dataClass) { + final _JniType jniType = _JniType.fromClass(dataClass); + return ''' + } else if (value is ${jniType.type.baseName}) { + return value.toJni() as T; + '''; + }).join()} + ${root.enums.map((Enum enumDefinition) { + final _JniType jniType = _JniType.fromEnum(enumDefinition); + return ''' + } else if (value is ${jniType.type.baseName}) { + return value.toJni() as T; + '''; + }).join()} + } else { + throw ArgumentError.value(value); + } + } +} + '''); + } + + void _writeConvertNumberWrapper(Indent indent, Root root) { + indent.newln(); + var typeNum = 4; + indent.format(''' + Object? convertNumberWrapperToDart(ffi_bridge.${_classNamePrefix}NumberWrapper value) { + switch (value.type) { + case 1: + return value.number.longValue; + case 2: + return value.number.doubleValue; + case 3: + return value.number.boolValue;'''); + indent.inc(2); + for (final Enum anEnum in root.enums) { + indent.format(''' + case ${typeNum++}: + return ${anEnum.name}.fromNSNumber(value.number);'''); + } + indent.dec(2); + indent.format(''' + default: + throw ArgumentError.value(value); + } + } +'''); + typeNum = 4; + indent.format( + ''' + ffi_bridge.${_classNamePrefix}NumberWrapper convertToFfiNumberWrapper(Object value) { + switch (value) { + case int _: + return ffi_bridge.${_classNamePrefix}NumberWrapper.alloc().initWithNumber(NSNumber.alloc().initWithLong(value), type: 1); + case double _: + return ffi_bridge.${_classNamePrefix}NumberWrapper.alloc().initWithNumber(NSNumber.alloc().initWithDouble(value), type: 2); + case bool _: + return ffi_bridge.${_classNamePrefix}NumberWrapper.alloc().initWithNumber(NSNumber.alloc().initWithLong(value ? 1 : 0), type: 3);''', + ); + for (final Enum anEnum in root.enums) { + indent.format( + ''' + case ${anEnum.name} _: + return ffi_bridge.${_classNamePrefix}NumberWrapper.alloc().initWithNumber(value.toNSNumber(), type: ${typeNum++});''', + ); + } + indent.format(''' + default: + throw ArgumentError.value(value); + } + } +'''); + } + + void _writeFfiCodec(Indent indent, Root root) { + indent.newln(); + indent.format(''' +class _PigeonFfiCodec { + static Object? readValue(ObjCObject? value, [Type? type, Type? type2]) { + if (value == null || ffi_bridge.${_classNamePrefix}PigeonInternalNull.isA(value)) { + return null; + } else if (NSNumber.isA(value)) { + final NSNumber numValue = NSNumber.as(value); + if (type == double) { + return numValue.doubleValue; + } else if (type == bool) { + return numValue.boolValue; + } + ${root.enums.map((Enum enumDefinition) => ''' + else if (type == ${enumDefinition.name}) { + return ${enumDefinition.name}.fromNSNumber(numValue); + }''').join('\n')} + + return numValue.longValue; + } else if (NSString.isA(value)) { + return (NSString.as(value)).toDartString(); + } else if (ffi_bridge.${_classNamePrefix}PigeonTypedData.isA(value)) { + return getValueFromPigeonTypedData(value as ffi_bridge.${_classNamePrefix}PigeonTypedData); + } else if (NSArray.isA(value)) { + final NSArray array = NSArray.as(value); + final List res = []; + for (int i = 0; i < array.count; i++) { + res.add(readValue(array.objectAtIndex(i), type)); + } + return res; + } else if (NSDictionary.isA(value)) { + final NSDictionary dict = NSDictionary.as(value); + final NSArray keys = dict.allKeys; + final Map res = {}; + for (int i = 0; i < keys.count; i++) { + final ObjCObject key = keys.objectAtIndex(i); + res[readValue(key, type, type2)] = readValue(dict.objectForKey(key), type, type2); + } + return res; + } else if (ffi_bridge.${_classNamePrefix}NumberWrapper.isA(value)) { + return convertNumberWrapperToDart(ffi_bridge.${_classNamePrefix}NumberWrapper.as(value)); + ${root.classes.map((Class dataClass) { + final _FfiType ffiType = _FfiType.fromClass(dataClass); + return ''' + } else if (${ffiType.ffiName}.isA(value)) { + return ${ffiType.type.baseName}.fromFfi(${ffiType.ffiName}.as(value)); + '''; + }).join()} + } else { + throw ArgumentError.value(value); + } + } + + static T writeValue( + Object? value, { + bool generic = false, + }) { + if (value == null) { + if (isTypeOrNullableType(ObjCObject) || isTypeOrNullableType(NSObject)) { + return ffi_bridge.${_classNamePrefix}PigeonInternalNull() as T; + } + return null as T; + } + if (value is bool) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithLong(value ? 1 : 0)) as T; + } else if (value is double) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithDouble(value)) as T; + // ignore: avoid_double_and_int_checks + } else if (value is int) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithLong(value)) as T; + } else if (value is Enum) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithLong(value.index)) as T; + } else if (value is String) { + return NSString(value) as T; + } else if (value is TypedData) { + return toPigeonTypedData(value) as T; + ${root.lists.values.sorted(sortByObjectCount).map((TypeDeclaration list) { + if (list.typeArguments.isEmpty || list.typeArguments.first.baseName == 'Object') { + return ''; + } + final _FfiType ffiType = _FfiType.fromTypeDeclaration(list); + return ''' + } else if (value is ${ffiType.type.getFullName(withNullable: false)} && isTypeOrNullableType<${ffiType.fullFfiName}>(T)) { + final NSMutableArray res = NSMutableArray(); + for (final ${ffiType.dartCollectionTypes} entry in value) { + res.addObject(${ffiType.subTypeOne!.type.isNullable ? 'entry == null ? ffi_bridge.${_classNamePrefix}PigeonInternalNull() : ' : ''}writeValue<${ffiType.subTypeOne?.getFfiCallReturnType(forceNonNullable: true) ?? 'ObjCObject'}>(entry, generic: true)); + } + return res as T; + '''; + }).join()} + } else if (value is List) { + final NSMutableArray res = NSMutableArray(); + for (final Object? entry in value) { + res.addObject(entry == null + ? ffi_bridge.${_classNamePrefix}PigeonInternalNull() + : writeValue(entry, generic: true)); + } + return res as T; + ${root.maps.entries.sorted((MapEntry a, MapEntry b) => sortByObjectCount(a.value, b.value)).map((MapEntry mapType) { + if (mapType.value.typeArguments.isEmpty || (mapType.value.typeArguments.first.baseName == 'Object' && mapType.value.typeArguments.last.baseName == 'Object')) { + return ''; + } + final _FfiType ffiType = _FfiType.fromTypeDeclaration(mapType.value); + return ''' + } else if (value is ${ffiType.type.getFullName(withNullable: false)} && isTypeOrNullableType<${ffiType.fullFfiName}>(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry${ffiType.dartCollectionTypeAnnotations} entry in value.entries) { + res.setObject(writeValue(entry.value, generic: true), forKey: NSCopying.as(writeValue(entry.key, generic: true))); + } + return res as T; + '''; + }).join()} + } else if (value is Map) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject(writeValue(entry.value, generic: true), forKey: NSCopying.as(writeValue(entry.key, generic: true))); + } + return res as T; + ${root.classes.map((Class dataClass) { + final _FfiType ffiType = _FfiType.fromClass(dataClass); + return ''' + } else if (value is ${ffiType.type.baseName}) { + return value.toFfi() as T; + '''; + }).join()} + } else { + throw ArgumentError.value(value); + } + } +} + +ffi_bridge.${_classNamePrefix}PigeonTypedData toPigeonTypedData(TypedData value) { + final int lengthInBytes = value.lengthInBytes; + if (value is Uint8List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = + NSData.dataWithBytes(ptr.cast(), length: lengthInBytes); + calloc.free(ptr); + return ffi_bridge.${_classNamePrefix}PigeonTypedData.alloc().initWithData(nsData, type: 0); + } else if (value is Int32List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = + NSData.dataWithBytes(ptr.cast(), length: lengthInBytes); + calloc.free(ptr); + return ffi_bridge.${_classNamePrefix}PigeonTypedData.alloc().initWithData(nsData, type: 1); + } else if (value is Int64List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = + NSData.dataWithBytes(ptr.cast(), length: lengthInBytes); + calloc.free(ptr); + return ffi_bridge.${_classNamePrefix}PigeonTypedData.alloc().initWithData(nsData, type: 2); + } else if (value is Float32List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = + NSData.dataWithBytes(ptr.cast(), length: lengthInBytes); + calloc.free(ptr); + return ffi_bridge.${_classNamePrefix}PigeonTypedData.alloc().initWithData(nsData, type: 3); + } else if (value is Float64List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = + NSData.dataWithBytes(ptr.cast(), length: lengthInBytes); + calloc.free(ptr); + return ffi_bridge.${_classNamePrefix}PigeonTypedData.alloc().initWithData(nsData, type: 4); + } + throw ArgumentError.value(value); +} + + +Object? getValueFromPigeonTypedData(ffi_bridge.${_classNamePrefix}PigeonTypedData value) { + final NSData data = value.data; + final Pointer bytes = data.bytes; + switch (value.type) { + case 0: + return Uint8List.fromList(bytes.cast().asTypedList(data.length)); + case 1: + return Int32List.fromList( + bytes.cast().asTypedList(data.length ~/ 4), + ); + case 2: + return Int64List.fromList( + bytes.cast().asTypedList(data.length ~/ 8), + ); + case 3: + return Float32List.fromList( + bytes.cast().asTypedList(data.length ~/ 4), + ); + case 4: + return Float64List.fromList( + bytes.cast().asTypedList(data.length ~/ 8), + ); + default: + throw ArgumentError.value(value); + } +} + '''); } /// Writes the `wrapResponse` method. @@ -1351,6 +3223,8 @@ if (wrapped == null) { required List documentationComments, required String channelName, required bool addSuffixVariable, + bool useJni = false, + bool useFfi = false, }) { addDocumentationComments(indent, documentationComments, docCommentSpec); final String argSignature = _getMethodParameterSignature(parameters); @@ -1358,6 +3232,17 @@ if (wrapped == null) { 'Future<${addGenericTypes(returnType)}> $name($argSignature) async ', ); indent.addScoped('{', '}', () { + if (useJni || useFfi) { + indent.writeScoped( + 'if (${useFfi ? '(' : ''}${useJni ? 'Platform.isAndroid ' : ''}${useJni && useFfi ? '|| ' : ''}${useFfi ? 'Platform.isIOS || Platform.isMacOS)' : ''} && _nativeInteropApi != null) {', + '}', + () { + indent.writeln( + 'return _nativeInteropApi.$name(${parameters.map((Parameter e) => '${e.isNamed ? '${e.name}: ' : ''}${e.name}').join(', ')});', + ); + }, + ); + } writeHostMethodMessageCall( indent, channelName: channelName, @@ -1377,17 +3262,9 @@ if (wrapped == null) { required bool addSuffixVariable, bool insideAsyncMethod = true, }) { - var sendArgument = 'null'; - if (parameters.isNotEmpty) { - final Iterable argExpressions = indexMap(parameters, ( - int index, - NamedType type, - ) { - final String name = getParameterName(index, type); - return name; - }); - sendArgument = '[${argExpressions.join(', ')}]'; - } + final String? arguments = _getArgumentsForMethodCall(parameters); + final sendArgument = arguments == null ? 'null' : '[$arguments]'; + final channelSuffix = addSuffixVariable ? '\$$_suffixVarName' : ''; final constOrFinal = addSuffixVariable ? 'final' : 'const'; indent.writeln( @@ -1612,16 +3489,67 @@ String _getSafeArgumentName(int count, NamedType field) => String getParameterName(int count, NamedType field) => field.name.isEmpty ? 'arg$count' : field.name; +String _getJniMethodParameterSignature( + Iterable parameters, { + bool addTrailingComma = false, + bool isAsynchronous = false, +}) { + var signature = ''; + if (parameters.isEmpty) { + return signature; + } + for (final parameter in parameters) { + final _JniType jniType = _JniType.fromTypeDeclaration(parameter.type); + signature += + '${jniType.getJniCallReturnType(false, isParameter: true, isAsynchronous: isAsynchronous)} ${parameter.name}${addTrailingComma || parameters.length > 1 ? ',' : ''}'; + } + return signature; +} + +String _getFfiMethodParameterSignature( + Iterable parameters, { + bool addTrailingComma = false, + bool isAsynchronous = false, +}) { + var signature = ''; + if (parameters.isEmpty) { + return signature; + } + for (final parameter in parameters) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(parameter.type); + signature += + '${ffiType.getFfiCallReturnType()} ${parameter.name}${addTrailingComma || parameters.length > 1 ? ',' : ''}'; + } + return signature; +} + /// Generates the parameters code for [func] /// Example: (func, getParameterName) -> 'String? foo, int bar' String _getMethodParameterSignature( Iterable parameters, { bool addTrailingComma = false, + bool useJni = false, + bool useFfi = false, + bool isAsynchronous = false, }) { var signature = ''; if (parameters.isEmpty) { return signature; } + if (useJni) { + return _getJniMethodParameterSignature( + parameters, + addTrailingComma: addTrailingComma, + isAsynchronous: isAsynchronous, + ); + } + if (useFfi) { + return _getFfiMethodParameterSignature( + parameters, + addTrailingComma: addTrailingComma, + isAsynchronous: isAsynchronous, + ); + } final List requiredPositionalParams = parameters .where((Parameter p) => p.isPositional && !p.isOptional) @@ -1691,7 +3619,11 @@ String _flattenTypeArguments(List args) { /// Returns the string representation of a [TypeDeclaration], including type /// arguments and a nullability suffix, if the type is nullable. -String addGenericTypes(TypeDeclaration type) { +String addGenericTypes( + TypeDeclaration type, { + bool useJni = false, + bool useFfi = false, +}) { final List typeArguments = type.typeArguments; final String genericType = switch (type.baseName) { 'List' => @@ -1702,7 +3634,12 @@ String addGenericTypes(TypeDeclaration type) { typeArguments.isEmpty ? 'Map' : 'Map<${_flattenTypeArguments(typeArguments)}>', - _ => type.baseName, + _ => + useJni + ? _JniType.fromTypeDeclaration(type).jniName + : useFfi + ? _FfiType.fromTypeDeclaration(type).ffiName + : type.baseName, }; return type.isNullable ? '$genericType?' : genericType; } @@ -1712,3 +3649,18 @@ String _posixify(String inputPath) { final context = path.Context(style: path.Style.posix); return context.fromUri(path.toUri(path.absolute(inputPath))); } + +String? _getArgumentsForMethodCall(Iterable parameters) { + if (parameters.isNotEmpty) { + return indexMap(parameters, (int index, NamedType type) { + final String name = getParameterName(index, type); + return name; + }).join(', '); + } + return null; +} + +/// Returns true if the generated code should use native interop (FFI or JNI). +bool usesNativeInterop(InternalDartOptions options) { + return options.useFfi || options.useJni; +} diff --git a/packages/pigeon/lib/src/generator.dart b/packages/pigeon/lib/src/generator.dart index e0c240b9b794..a111ed4a5cd9 100644 --- a/packages/pigeon/lib/src/generator.dart +++ b/packages/pigeon/lib/src/generator.dart @@ -19,6 +19,8 @@ abstract class Generator { const Generator(); /// Generates files for specified language with specified [generatorOptions] + /// + /// This method must create an [Indent] and call `sink.write(indent.toString())`. void generate( T generatorOptions, Root root, diff --git a/packages/pigeon/lib/src/generator_tools.dart b/packages/pigeon/lib/src/generator_tools.dart index 2890bb571542..35bd4e21bca1 100644 --- a/packages/pigeon/lib/src/generator_tools.dart +++ b/packages/pigeon/lib/src/generator_tools.dart @@ -15,7 +15,7 @@ import 'generator.dart'; /// The current version of pigeon. /// /// This must match the version in pubspec.yaml. -const String pigeonVersion = '26.3.1'; +const String pigeonVersion = '26.4.0'; /// Default plugin package name. const String defaultPluginPackageName = 'dev.flutter.pigeon'; @@ -410,7 +410,7 @@ void addLines(Indent indent, Iterable lines, {String? linePrefix}) { /// /// In other words, whenever there is a conflict over the value of a key path, /// [modification]'s value for that key path is selected. -Map mergeMaps( +Map mergePigeonMaps( Map base, Map modification, ) { @@ -420,7 +420,7 @@ Map mergeMaps( final Object entryValue = entry.value; if (entryValue is Map) { assert(base[entry.key] is Map); - result[entry.key] = mergeMaps( + result[entry.key] = mergePigeonMaps( (base[entry.key] as Map?)!, entryValue, ); @@ -572,25 +572,26 @@ Map> getReferencedTypes( final Set referencedTypeNames = references.map.keys .map((TypeDeclaration e) => e.baseName) .toSet(); - final classesToCheck = List.from(referencedTypeNames); + final classesToCheck = Set.from(referencedTypeNames); while (classesToCheck.isNotEmpty) { - final String next = classesToCheck.removeLast(); + final String next = classesToCheck.last; final Class aClass = classes.firstWhere( (Class x) => x.name == next, orElse: () => Class(name: '', fields: []), ); for (final NamedType field in aClass.fields) { + references.add(field.type, field.offset); if (_isUnseenCustomType(field.type, referencedTypeNames)) { - references.add(field.type, field.offset); classesToCheck.add(field.type.baseName); } for (final TypeDeclaration typeArg in field.type.typeArguments) { + references.add(typeArg, field.offset); if (_isUnseenCustomType(typeArg, referencedTypeNames)) { - references.add(typeArg, field.offset); classesToCheck.add(typeArg.baseName); } } } + classesToCheck.remove(next); } return references.map; } @@ -906,3 +907,22 @@ bool isCollectionType(TypeDeclaration type) { !type.isProxyApi && (type.baseName.contains('List') || type.baseName == 'Map'); } + +/// Wraps provided [toWrap] with [start] and [end] if [wrap] is true. +String wrapConditionally(String toWrap, String start, String end, bool wrap) { + return wrap ? '$start$toWrap$end' : toWrap; +} + +/// Sorts collections by how generic they are. +int sortByObjectCount(TypeDeclaration a, TypeDeclaration b) { + var aTotal = 0; + var bTotal = 0; + + aTotal += a.getFullName(withNullable: false).split('?').length; + bTotal += b.getFullName(withNullable: false).split('?').length; + + aTotal += a.getFullName(withNullable: false).split('Object').length * 100; + bTotal += b.getFullName(withNullable: false).split('Object').length * 100; + + return aTotal < bTotal ? -1 : 1; +} diff --git a/packages/pigeon/lib/src/gobject/gobject_generator.dart b/packages/pigeon/lib/src/gobject/gobject_generator.dart index 0906c005d78a..f968135766f1 100644 --- a/packages/pigeon/lib/src/gobject/gobject_generator.dart +++ b/packages/pigeon/lib/src/gobject/gobject_generator.dart @@ -71,7 +71,7 @@ class GObjectOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [GObjectOptions]. GObjectOptions merge(GObjectOptions options) { - return GObjectOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return GObjectOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/java/java_generator.dart b/packages/pigeon/lib/src/java/java_generator.dart index 4b7f792dc1c3..a01647d89130 100644 --- a/packages/pigeon/lib/src/java/java_generator.dart +++ b/packages/pigeon/lib/src/java/java_generator.dart @@ -84,7 +84,7 @@ class JavaOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [JavaOptions]. JavaOptions merge(JavaOptions options) { - return JavaOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return JavaOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/kotlin/jnigen_config_generator.dart b/packages/pigeon/lib/src/kotlin/jnigen_config_generator.dart new file mode 100644 index 000000000000..b95f25de6958 --- /dev/null +++ b/packages/pigeon/lib/src/kotlin/jnigen_config_generator.dart @@ -0,0 +1,93 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:path/path.dart' as path; + +import '../ast.dart'; +import '../dart/dart_generator.dart' show InternalDartOptions; +import '../generator.dart'; +import '../generator_tools.dart'; +import 'kotlin_generator.dart' show InternalKotlinOptions; + +/// Options for [JnigenConfigGenerator]. +class InternalJnigenConfigOptions extends InternalOptions { + /// Creates a [InternalJnigenConfigOptions]. + InternalJnigenConfigOptions( + this.dartOptions, + this.kotlinOptions, + this.basePath, + this.appDirectory, + ); + + /// Dart options. + final InternalDartOptions dartOptions; + + /// Kotlin options. + final InternalKotlinOptions kotlinOptions; + + /// A base path to be prepended to all provided output paths. + final String? basePath; + + /// App directory. + final String? appDirectory; +} + +/// Generator for jnigen yaml configuration file. +class JnigenConfigGenerator extends Generator { + @override + void generate( + InternalJnigenConfigOptions generatorOptions, + Root root, + StringSink sink, { + required String dartPackageName, + }) { + final indent = Indent(); + indent.writeln('// ignore_for_file: prefer_const_constructors'); + indent.writeln("import 'package:jnigen/jnigen.dart';"); + indent.writeln("import 'package:logging/logging.dart';"); + indent.writeln("import 'package:pigeon/jnigen_fix.dart';"); + indent.writeln(''); + indent.writeScoped('void main() async {', '}', () { + indent.writeScoped('await generateJniBindings(', ');', () { + indent.writeScoped('Config(', '),', () { + indent.format(''' + androidSdkConfig: AndroidSdkConfig( + addGradleDeps: true, + androidExample: './', + ), + summarizerOptions: SummarizerOptions(backend: SummarizerBackend.asm), + outputConfig: OutputConfig( + dartConfig: DartCodeOutputConfig( + path: Uri.file('${path.relative(path.withoutExtension(generatorOptions.dartOptions.dartOut ?? './lib/pigeons/'), from: generatorOptions.appDirectory ?? './')}.jni.dart'), + structure: OutputStructure.singleFile, + ), + ), + logLevel: Level.ALL,'''); + indent.writeScoped('classes: [', '],', () { + indent.writeln( + "'${generatorOptions.kotlinOptions.errorClassName ?? 'FlutterError'}',", + ); + for (final Api api in root.apis) { + if (api is AstHostApi || api is AstFlutterApi) { + indent.writeln("'${api.name}',"); + indent.writeln("'${api.name}Registrar',"); + } + } + for (final Class dataClass in root.classes) { + indent.writeln("'${dataClass.name}',"); + } + for (final Enum enumType in root.enums) { + indent.writeln("'${enumType.name}',"); + } + }); + }); + }); + indent.newln(); + final outputPath = + '${path.relative(path.withoutExtension(generatorOptions.dartOptions.dartOut ?? './lib/pigeons/'), from: generatorOptions.appDirectory ?? './')}.jni.dart'; + indent.writeln("fixJniBindings('${outputPath.replaceAll("'", r"\'")}');"); + }); + sink.write(indent.toString()); + } +} diff --git a/packages/pigeon/lib/src/kotlin/kotlin_generator.dart b/packages/pigeon/lib/src/kotlin/kotlin_generator.dart index fee33c6b66d6..5d7923ed3337 100644 --- a/packages/pigeon/lib/src/kotlin/kotlin_generator.dart +++ b/packages/pigeon/lib/src/kotlin/kotlin_generator.dart @@ -45,6 +45,8 @@ class KotlinOptions { const KotlinOptions({ this.package, this.copyrightHeader, + this.useJni = false, + this.appDirectory, this.errorClassName, this.includeErrorClass = true, this.fileSpecificClassNameComponent, @@ -57,6 +59,12 @@ class KotlinOptions { /// A copyright header that will get prepended to generated code. final Iterable? copyrightHeader; + /// Whether to use Jni when possible. + final bool useJni; + + /// The directory that the app exists in, this is required for Jni APIs. + final String? appDirectory; + /// The name of the error class used for passing custom error parameters. final String? errorClassName; @@ -79,6 +87,8 @@ class KotlinOptions { static KotlinOptions fromMap(Map map) { return KotlinOptions( package: map['package'] as String?, + useJni: map['useJni'] as bool? ?? false, + appDirectory: map['appDirectory'] as String?, copyrightHeader: map['copyrightHeader'] as Iterable?, errorClassName: map['errorClassName'] as String?, includeErrorClass: map['includeErrorClass'] as bool? ?? true, @@ -93,6 +103,8 @@ class KotlinOptions { Map toMap() { final result = { if (package != null) 'package': package!, + if (useJni) 'useJni': useJni, + if (appDirectory != null) 'appDirectory': appDirectory!, if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, if (errorClassName != null) 'errorClassName': errorClassName!, 'includeErrorClass': includeErrorClass, @@ -106,11 +118,11 @@ class KotlinOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [KotlinOptions]. KotlinOptions merge(KotlinOptions options) { - return KotlinOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return KotlinOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } -/// +/// Options that control how Kotlin code will be generated. class InternalKotlinOptions extends InternalOptions { /// Creates a [InternalKotlinOptions] object const InternalKotlinOptions({ @@ -119,6 +131,8 @@ class InternalKotlinOptions extends InternalOptions { this.copyrightHeader, this.errorClassName, this.includeErrorClass = true, + this.useJni = false, + this.appDirectory, this.fileSpecificClassNameComponent, this.useGeneratedAnnotation = false, }); @@ -128,13 +142,20 @@ class InternalKotlinOptions extends InternalOptions { KotlinOptions options, { required this.kotlinOut, Iterable? copyrightHeader, + String? fileSpecificClassNameComponent, }) : package = options.package, copyrightHeader = options.copyrightHeader ?? copyrightHeader, errorClassName = options.errorClassName, includeErrorClass = options.includeErrorClass, + useJni = options.useJni, + appDirectory = options.appDirectory, useGeneratedAnnotation = options.useGeneratedAnnotation, fileSpecificClassNameComponent = - options.fileSpecificClassNameComponent ?? + (options.useJni + ? fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent + : options.fileSpecificClassNameComponent ?? + fileSpecificClassNameComponent) ?? kotlinOut.split('/').lastOrNull?.split('.').first; /// The package where the generated class will live. @@ -155,6 +176,12 @@ class InternalKotlinOptions extends InternalOptions { /// Kotlin file in the same directory. final bool includeErrorClass; + /// Whether to use Jni for generating kotlin interop code. + final bool useJni; + + /// The directory that the app exists in, this is required for Jni APIs. + final String? appDirectory; + /// A String to augment class names to avoid cross file collisions. final String? fileSpecificClassNameComponent; @@ -224,11 +251,14 @@ class KotlinGenerator extends StructuredGenerator { required String dartPackageName, }) { indent.newln(); - if (generatorOptions.package != null) { + if (generatorOptions.package != null && !generatorOptions.useJni) { indent.writeln('package ${generatorOptions.package}'); } indent.newln(); indent.writeln('import android.util.Log'); + if (generatorOptions.useJni) { + indent.writeln('import androidx.annotation.Keep'); + } indent.writeln('import io.flutter.plugin.common.BasicMessageChannel'); indent.writeln('import io.flutter.plugin.common.BinaryMessenger'); indent.writeln('import io.flutter.plugin.common.EventChannel'); @@ -524,6 +554,12 @@ class KotlinGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + if (generatorOptions.useJni && + !root.containsEventChannel && + !root.containsFlutterApi && + !root.containsProxyApi) { + return; + } final List enumeratedTypes = getEnumeratedTypes( root, excludeSealedClasses: true, @@ -704,6 +740,42 @@ if (wrapped == null) { }); } + void _writeJniFlutterApi( + InternalKotlinOptions generatorOptions, + Root root, + Indent indent, + AstFlutterApi api, { + required String dartPackageName, + }) { + indent.format(''' +val registered${api.name}: MutableMap = mutableMapOf() +class ${api.name}Registrar() { + /// Map that stores instances + + fun registerInstance(api: ${api.name}, name: String = defaultInstanceName) { + registered${api.name}[name] = api + } + + fun getInstance(name: String = defaultInstanceName): ${api.name}? { + return registered${api.name}[name] + } +} +'''); + indent.writeScoped('interface ${api.name} {', '}', () { + for (final Method method in api.methods) { + _writeMethodDeclaration( + indent, + name: method.name, + documentationComments: method.documentationComments, + returnType: method.returnType, + parameters: method.parameters, + isAsynchronous: method.isAsynchronous, + useJni: true, + ); + } + }); + } + /// Writes the code for a flutter [Api], [api]. /// Example: /// class Foo(private val binaryMessenger: BinaryMessenger) { @@ -726,7 +798,16 @@ if (wrapped == null) { _docCommentSpec, generatorComments: generatedMessages, ); - + if (generatorOptions.useJni) { + _writeJniFlutterApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + return; + } final String apiName = api.name; indent.write( 'class $apiName(private val binaryMessenger: BinaryMessenger, private val messageChannelSuffix: String = "") ', @@ -779,6 +860,85 @@ if (wrapped == null) { }); } + void _writeJniHostApi( + InternalKotlinOptions generatorOptions, + Root root, + Indent indent, + AstHostApi api, { + required String dartPackageName, + }) { + indent.writeln( + 'val ${api.name}Instances: MutableMap = mutableMapOf()', + ); + indent.writeln('@Keep'); + indent.writeScoped('abstract class ${api.name} {', '}', () { + for (final Method method in api.methods) { + _writeMethodDeclaration( + indent, + name: method.name, + documentationComments: method.documentationComments, + returnType: method.returnType, + parameters: method.parameters, + isAsynchronous: method.isAsynchronous, + useJni: true, + isAbstract: true, + ); + } + }); + + indent.writeln('@Keep'); + indent.writeScoped('class ${api.name}Registrar : ${api.name}() {', '}', () { + indent.writeln('var api: ${api.name}? = null'); + + indent.writeScoped('fun register(', '):', () { + indent.writeln('api: ${api.name},'); + indent.writeln('name: String = defaultInstanceName'); + }, addTrailingNewline: false); + indent.writeScoped(' ${api.name}Registrar {', '}', () { + indent.writeln('this.api = api'); + indent.writeln('${api.name}Instances[name] = this'); + indent.writeln('return this'); + }); + + indent.writeln('@Keep'); + indent.writeScoped( + 'fun getInstance(name: String): ${api.name}Registrar? {', + '}', + () { + indent.writeln('return ${api.name}Instances[name]'); + }, + ); + + for (final Method method in api.methods) { + _writeMethodDeclaration( + indent, + name: method.name, + documentationComments: method.documentationComments, + returnType: method.returnType, + parameters: method.parameters, + isAsynchronous: method.isAsynchronous, + isOverride: true, + useJni: true, + ); + final String argNames = method.parameters + .map((Parameter arg) => arg.name) + .join(', '); + indent.addScoped(' {', '}', () { + indent.writeScoped('api?.let {', '}', () { + indent.writeScoped('try {', '}', () { + indent.writeln('return api!!.${method.name}($argNames)'); + }, addTrailingNewline: false); + indent.addScoped(' catch (e: Exception) {', '}', () { + indent.writeln('throw e'); + }); + }); + + indent.writeln('error("${api.name} has not been set")'); + }); + } + }); + } + /// Write the kotlin code that represents a host [Api], [api]. /// Example: /// interface Foo { @@ -796,6 +956,16 @@ if (wrapped == null) { AstHostApi api, { required String dartPackageName, }) { + if (generatorOptions.useJni) { + _writeJniHostApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + return; + } final String apiName = api.name; const generatedMessages = [ @@ -1255,6 +1425,7 @@ if (wrapped == null) { '''); if (api.kotlinOptions?.includeSharedClasses ?? true) { + // TODO(tarrinneal): Prefix this class to avoid name collisions. indent.format(''' class PigeonEventSink(private val sink: EventChannel.EventSink) { fun success(value: T) { @@ -1554,6 +1725,11 @@ fun floatHash(f: Float): Int { if (generatorOptions.includeErrorClass) { _writeErrorClass(generatorOptions, indent); } + if (generatorOptions.useJni) { + indent.writeln( + 'const val defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u"', + ); + } } static void _writeMethodDeclaration( @@ -1566,6 +1742,8 @@ fun floatHash(f: Float): Int { bool isAsynchronous = false, bool isOpen = false, bool isAbstract = false, + bool isOverride = false, + bool useJni = false, String Function(int index, NamedType type) getArgumentName = _getArgumentName, }) { @@ -1596,20 +1774,25 @@ fun floatHash(f: Float): Int { } final openKeyword = isOpen ? 'open ' : ''; - final abstractKeyword = isAbstract ? 'abstract ' : ''; + final inheritanceKeyword = isAbstract + ? 'abstract ' + : isOverride + ? 'override ' + : ''; + final suspendKeyword = isAsynchronous && useJni ? 'suspend ' : ''; - if (isAsynchronous) { + if (isAsynchronous && !useJni) { argSignature.add('callback: (Result<$resultType>) -> Unit'); indent.writeln( - '$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')})', + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')})', ); } else if (returnType.isVoid) { indent.writeln( - '$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')})', + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')})', ); } else { indent.writeln( - '$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')}): $returnTypeString', + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')}): $returnTypeString', ); } } diff --git a/packages/pigeon/lib/src/objc/objc_generator.dart b/packages/pigeon/lib/src/objc/objc_generator.dart index af0ad6d1ea2a..6b0a45eaf59c 100644 --- a/packages/pigeon/lib/src/objc/objc_generator.dart +++ b/packages/pigeon/lib/src/objc/objc_generator.dart @@ -94,7 +94,7 @@ class ObjcOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [ObjcOptions]. ObjcOptions merge(ObjcOptions options) { - return ObjcOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return ObjcOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/pigeon_lib.dart b/packages/pigeon/lib/src/pigeon_lib.dart index fd6b6c827b2b..bff977eceedf 100644 --- a/packages/pigeon/lib/src/pigeon_lib.dart +++ b/packages/pigeon/lib/src/pigeon_lib.dart @@ -241,6 +241,7 @@ class PigeonOptions { /// Creates a instance of PigeonOptions const PigeonOptions({ this.input, + this.appDirectory, this.dartOut, @Deprecated('Mock/fake the generated Dart API instead.') this.dartTestOut, this.objcHeaderOut, @@ -263,6 +264,7 @@ class PigeonOptions { this.astOut, this.debugGenerators, this.basePath, + this.fileSpecificClassNameComponent, String? dartPackageName, this.ignoreLints = true, }) : _dartPackageName = dartPackageName; @@ -270,6 +272,9 @@ class PigeonOptions { /// Path to the file which will be processed. final String? input; + /// The directory that the app exists in, this is required for Jni and Ffi APIs. + final String? appDirectory; + /// Path to the Dart file that will be generated. final String? dartOut; @@ -343,11 +348,15 @@ class PigeonOptions { /// Whether to ignore lint violations in generated Dart code. final bool ignoreLints; + /// A String to augment class names to avoid cross file collisions. + final String? fileSpecificClassNameComponent; + /// Creates a [PigeonOptions] from a Map representation where: /// `x = PigeonOptions.fromMap(x.toMap())`. static PigeonOptions fromMap(Map map) { return PigeonOptions( input: map['input'] as String?, + appDirectory: map['appDirectory'] as String?, dartOut: map['dartOut'] as String?, dartTestOut: map['dartTestOut'] as String?, objcHeaderOut: map['objcHeaderOut'] as String?, @@ -386,6 +395,8 @@ class PigeonOptions { astOut: map['astOut'] as String?, debugGenerators: map['debugGenerators'] as bool?, basePath: map['basePath'] as String?, + fileSpecificClassNameComponent: + map['fileSpecificClassNameComponent'] as String?, dartPackageName: map['dartPackageName'] as String?, ); } @@ -395,6 +406,7 @@ class PigeonOptions { Map toMap() { final result = { if (input != null) 'input': input!, + if (appDirectory != null) 'appDirectory': appDirectory!, if (dartOut != null) 'dartOut': dartOut!, if (dartTestOut != null) 'dartTestOut': dartTestOut!, if (objcHeaderOut != null) 'objcHeaderOut': objcHeaderOut!, @@ -417,6 +429,8 @@ class PigeonOptions { if (astOut != null) 'astOut': astOut!, if (debugGenerators != null) 'debugGenerators': debugGenerators!, if (basePath != null) 'basePath': basePath!, + if (fileSpecificClassNameComponent != null) + 'fileSpecificClassNameComponent': fileSpecificClassNameComponent!, if (_dartPackageName != null) 'dartPackageName': _dartPackageName, }; return result; @@ -425,7 +439,7 @@ class PigeonOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [PigeonOptions]. PigeonOptions merge(PigeonOptions options) { - return PigeonOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return PigeonOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } /// Returns provided or deduced package name, throws `Exception` if none found. @@ -616,6 +630,10 @@ ${_argParser.usage}'''; 'A base path to be prefixed to all outputs and copyright header path. Generally used for testing', hide: true, ) + ..addOption( + 'file_specific_class_name_component', + help: 'A String to augment class names to avoid cross file collisions.', + ) ..addOption( 'package_name', help: 'The package that generated code will be in.', @@ -666,6 +684,8 @@ ${_argParser.usage}'''; astOut: results['ast_out'] as String?, debugGenerators: results['debug_generators'] as bool?, basePath: results['base_path'] as String?, + fileSpecificClassNameComponent: + results['file_specific_class_name_component'] as String?, dartPackageName: results['package_name'] as String?, ignoreLints: results.flag('ignore_lints'), ); @@ -725,7 +745,9 @@ ${_argParser.usage}'''; const DartGeneratorAdapter(), const JavaGeneratorAdapter(), const SwiftGeneratorAdapter(), + const FfigenConfigGeneratorAdapter(), const KotlinGeneratorAdapter(), + const JnigenConfigGeneratorAdapter(), const CppGeneratorAdapter(), const GObjectGeneratorAdapter(), const DartTestGeneratorAdapter(), @@ -754,7 +776,7 @@ ${_argParser.usage}'''; if (parseResults.pigeonOptions != null && mergeDefinitionFileOptions) { options = PigeonOptions.fromMap( - mergeMaps(options.toMap(), parseResults.pigeonOptions!), + mergePigeonMaps(options.toMap(), parseResults.pigeonOptions!), ); } diff --git a/packages/pigeon/lib/src/pigeon_lib_internal.dart b/packages/pigeon/lib/src/pigeon_lib_internal.dart index 75bbb96a293e..9c9c4e84f4e4 100644 --- a/packages/pigeon/lib/src/pigeon_lib_internal.dart +++ b/packages/pigeon/lib/src/pigeon_lib_internal.dart @@ -23,9 +23,11 @@ import 'dart/dart_generator.dart'; import 'generator_tools.dart'; import 'gobject/gobject_generator.dart'; import 'java/java_generator.dart'; +import 'kotlin/jnigen_config_generator.dart'; import 'kotlin/kotlin_generator.dart'; import 'objc/objc_generator.dart'; import 'pigeon_lib.dart'; +import 'swift/ffigen_config_generator.dart'; import 'swift/swift_generator.dart'; /// Options used when running the code generator. @@ -33,6 +35,7 @@ class InternalPigeonOptions { /// Creates a instance of InternalPigeonOptions const InternalPigeonOptions({ required this.input, + required this.appDirectory, required this.objcOptions, required this.javaOptions, required this.swiftOptions, @@ -51,6 +54,7 @@ class InternalPigeonOptions { PigeonOptions options, Iterable? copyrightHeader, ) : input = options.input, + appDirectory = options.appDirectory, objcOptions = (options.objcHeaderOut == null || options.objcSourceOut == null) ? null @@ -59,6 +63,8 @@ class InternalPigeonOptions { objcHeaderOut: options.objcHeaderOut!, objcSourceOut: options.objcSourceOut!, fileSpecificClassNameComponent: + options.objcOptions?.fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent ?? options.objcSourceOut ?.split('/') .lastOrNull @@ -80,6 +86,9 @@ class InternalPigeonOptions { options.swiftOptions ?? const SwiftOptions(), swiftOut: options.swiftOut!, copyrightHeader: copyrightHeader, + fileSpecificClassNameComponent: + options.swiftOptions?.fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent, ), kotlinOptions = options.kotlinOut == null ? null @@ -87,6 +96,9 @@ class InternalPigeonOptions { options.kotlinOptions ?? const KotlinOptions(), kotlinOut: options.kotlinOut!, copyrightHeader: copyrightHeader, + fileSpecificClassNameComponent: + options.kotlinOptions?.fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent, ), cppOptions = (options.cppHeaderOut == null || options.cppSourceOut == null) @@ -116,6 +128,30 @@ class InternalPigeonOptions { dartOut: options.dartOut, testOut: options.dartTestOut, copyrightHeader: copyrightHeader, + useJni: options.kotlinOptions?.useJni ?? false, + useFfi: options.swiftOptions?.useFfi ?? false, + ffiErrorClassName: + options.swiftOptions?.errorClassName ?? 'PigeonError', + jniErrorClassName: + options.kotlinOptions?.errorClassName ?? 'FlutterError', + fileSpecificClassNameComponent: + options.fileSpecificClassNameComponent ?? + (options.swiftOptions?.useFfi ?? false + ? options.swiftOptions?.fileSpecificClassNameComponent ?? + options.swiftOut + ?.split('/') + .lastOrNull + ?.split('.') + .firstOrNull + : null) ?? + (options.kotlinOptions?.useJni ?? false + ? options.kotlinOptions?.fileSpecificClassNameComponent ?? + options.kotlinOut + ?.split('/') + .lastOrNull + ?.split('.') + .firstOrNull + : null), ), copyrightHeader = options.copyrightHeader != null ? _lineReader( @@ -144,6 +180,9 @@ class InternalPigeonOptions { /// Path to the file which will be processed. final String? input; + /// Path to the app directory. + final String? appDirectory; + /// Options that control how Dart will be generated. final InternalDartOptions? dartOptions; @@ -508,6 +547,56 @@ class SwiftGeneratorAdapter implements GeneratorAdapter { List validate(InternalPigeonOptions options, Root root) => []; } +/// A [GeneratorAdapter] that generates FfigenConfig source code. +class FfigenConfigGeneratorAdapter implements GeneratorAdapter { + /// Constructor for [FfigenConfigGeneratorAdapter]. + const FfigenConfigGeneratorAdapter(); + + @override + List get fileTypeList => const [FileType.na]; + + @override + void generate( + StringSink sink, + InternalPigeonOptions options, + Root root, + FileType fileType, + ) { + if (options.swiftOptions == null || options.dartOptions == null) { + return; + } + final generator = FfigenConfigGenerator(); + + final ffigenYamlOptions = InternalFfigenConfigOptions( + options.dartOptions!, + options.swiftOptions!, + options.basePath, + options.dartOptions?.dartOut, + options.swiftOptions!.swiftOut, + ); + + generator.generate( + ffigenYamlOptions, + root, + sink, + dartPackageName: options.dartPackageName, + ); + } + + @override + IOSink? shouldGenerate(InternalPigeonOptions options, FileType _) => + options.swiftOptions?.appDirectory != null && + (options.swiftOptions?.useFfi ?? false) + ? _openSink( + 'ffigen_config.dart', + basePath: options.swiftOptions?.appDirectory ?? '', + ) + : null; + + @override + List validate(InternalPigeonOptions options, Root root) => []; +} + /// A [GeneratorAdapter] that generates C++ source code. class CppGeneratorAdapter implements GeneratorAdapter { /// Constructor for [CppGeneratorAdapter]. @@ -681,6 +770,51 @@ class KotlinGeneratorAdapter implements GeneratorAdapter { List validate(InternalPigeonOptions options, Root root) => []; } +/// A [GeneratorAdapter] that generates JnigenYaml source code. +class JnigenConfigGeneratorAdapter implements GeneratorAdapter { + /// Constructor for [JnigenConfigGeneratorAdapter]. + const JnigenConfigGeneratorAdapter(); + + @override + List get fileTypeList => const [FileType.na]; + + @override + void generate( + StringSink sink, + InternalPigeonOptions options, + Root root, + FileType fileType, + ) { + if (options.kotlinOptions == null || options.dartOptions == null) { + return; + } + final generator = JnigenConfigGenerator(); + final jnigenYamlOptions = InternalJnigenConfigOptions( + options.dartOptions!, + options.kotlinOptions!, + options.basePath, + options.appDirectory, + ); + + generator.generate( + jnigenYamlOptions, + root, + sink, + dartPackageName: options.dartPackageName, + ); + } + + @override + IOSink? shouldGenerate(InternalPigeonOptions options, FileType _) => + options.kotlinOptions?.kotlinOut != null && + (options.kotlinOptions?.useJni ?? false) + ? _openSink('jnigen_config.dart', basePath: options.appDirectory ?? '') + : null; + + @override + List validate(InternalPigeonOptions options, Root root) => []; +} + dart_ast.Annotation? _findMetadata( dart_ast.NodeList metadata, String query, @@ -1293,6 +1427,8 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { ParseResults results() { _storeCurrentApi(); _storeCurrentClass(); + final referencedLists = {}; + final referencedMaps = {}; final Map> referencedTypes = getReferencedTypes( _apis, @@ -1310,6 +1446,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { } final referencedEnums = List.from(_enums); + var containsHostApi = false; var containsFlutterApi = false; var containsProxyApi = false; @@ -1326,18 +1463,14 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { case AstEventChannelApi(): containsEventChannel = true; } + if (containsEventChannel && + containsFlutterApi && + containsProxyApi && + containsHostApi) { + break; + } } - final completeRoot = Root( - apis: _apis, - classes: _classes, - enums: referencedEnums, - containsHostApi: containsHostApi, - containsFlutterApi: containsFlutterApi, - containsProxyApi: containsProxyApi, - containsEventChannel: containsEventChannel, - ); - final totalErrors = List.from(_errors); for (final MapEntry> element @@ -1398,13 +1531,43 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { api.interfaces = newInterfaceSet; } } + + final Map> referencedTypesAfterAssoc = + getReferencedTypes(_apis, _classes); + + for (final TypeDeclaration type in referencedTypesAfterAssoc.keys) { + if (type.baseName == 'List') { + referencedLists[type.getFullName(withNullable: false)] = type; + } else if (type.baseName == 'Map') { + referencedMaps[type.getFullName(withNullable: false)] = type; + } + } + + final completeRoot = Root( + apis: _apis, + classes: _classes, + enums: referencedEnums, + lists: referencedLists, + maps: referencedMaps, + containsHostApi: containsHostApi, + containsFlutterApi: containsFlutterApi, + containsProxyApi: containsProxyApi, + containsEventChannel: containsEventChannel, + ); + final List validateErrors = _validateAst(completeRoot, source); totalErrors.addAll(validateErrors); return ParseResults( root: totalErrors.isEmpty ? completeRoot - : Root(apis: [], classes: [], enums: []), + : Root( + apis: [], + classes: [], + enums: [], + lists: {}, + maps: {}, + ), errors: totalErrors, pigeonOptions: _pigeonOptions, ); diff --git a/packages/pigeon/lib/src/swift/ffigen_config_generator.dart b/packages/pigeon/lib/src/swift/ffigen_config_generator.dart new file mode 100644 index 000000000000..16a19752db6b --- /dev/null +++ b/packages/pigeon/lib/src/swift/ffigen_config_generator.dart @@ -0,0 +1,217 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:path/path.dart' as path; + +import '../ast.dart'; +import '../dart/dart_generator.dart' show InternalDartOptions; +import '../generator.dart'; +import '../generator_tools.dart'; +import 'swift_generator.dart' show InternalSwiftOptions; + +/// Options for [FfigenConfigGenerator]. +class InternalFfigenConfigOptions extends InternalOptions { + /// Creates a [InternalFfigenConfigOptions]. + InternalFfigenConfigOptions( + this.dartOptions, + this.swiftOptions, + this.basePath, + this.dartOut, + this.exampleAppDirectory, + ); + + /// Dart options. + final InternalDartOptions dartOptions; + + /// Swift options. + final InternalSwiftOptions swiftOptions; + + /// A base path to be prepended to all provided output paths. + final String? basePath; + + /// Dart output path. + final String? dartOut; + + /// Android example app directory. + final String? exampleAppDirectory; +} + +/// Generator for ffigen configuration file. +class FfigenConfigGenerator extends Generator { + @override + void generate( + InternalFfigenConfigOptions generatorOptions, + Root root, + StringSink sink, { + required String dartPackageName, + }) { + final indent = Indent(); + indent.format(''' +import 'dart:io'; +import 'package:ffigen/ffigen.dart' as fg; +import 'package:pub_semver/pub_semver.dart'; +import 'package:swift2objc/src/ast/_core/interfaces/declaration.dart'; +import 'package:swiftgen/src/config.dart'; +import 'package:swiftgen/swiftgen.dart'; + + '''); + final bool hasAsyncFlutterApi = root.apis.whereType().any( + (AstFlutterApi api) => + api.methods.any((Method method) => method.isAsynchronous), + ); + + final String? configuredSdkPath = + generatorOptions.swiftOptions.appleSdkPath; + final String? configuredSdkTriple = + generatorOptions.swiftOptions.appleSdkTriple; + + final String objcDir = path.posix.join( + path.posix.dirname( + path.posix.dirname(generatorOptions.swiftOptions.swiftOut), + ), + '${path.posix.basename(path.posix.dirname(generatorOptions.swiftOptions.swiftOut))}_objc', + ); + + indent.writeScoped('Future main(List args) async {', '}', () { + if (configuredSdkPath != null) { + indent.writeln("String sdkPath = '$configuredSdkPath';"); + indent.writeln('if (args.isNotEmpty) {'); + indent.writeln(' sdkPath = args[0];'); + indent.writeln('}'); + } else { + indent.format(''' + var sdkPath = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk'; + if (args.isNotEmpty) { + sdkPath = args[0]; + } else { + var didFallback = true; + try { + final ProcessResult result = await Process.run('xcrun', ['--sdk', 'iphoneos', '--show-sdk-path']); + if (result.exitCode == 0) { + sdkPath = (result.stdout as String).trim(); + didFallback = false; + } + } catch (_) {} + if (didFallback) { + // ignore: avoid_print + print('Failed to find iOS SDK path with xcrun. Falling back to default iOS SDK path.'); + // ignore: avoid_print + print('If FFI generation fails, please provide a valid iOS SDK path in the Pigeon configuration for SwiftOptions(appleSdkPath: ...), or pass it as an argument when running ffigen.'); + } + } +'''); + } + final String prefix = + generatorOptions.swiftOptions.fileSpecificClassNameComponent ?? ''; + indent.writeScoped('final classes = [', '];', () { + indent.inc(); + indent.writeln("'${prefix}PigeonInternalNull',"); + indent.writeln("'${prefix}PigeonTypedData',"); + indent.writeln("'${prefix}NumberWrapper',"); + if (hasAsyncFlutterApi) { + indent.writeln("'NSURLCredential',"); + } + for (final Api api in root.apis) { + if (api is AstHostApi) { + indent.writeln("'${api.name}',"); + indent.writeln("'${api.name}Setup',"); + } + if (api is AstFlutterApi) { + indent.writeln("'${api.name}Bridge',"); + indent.writeln("'${api.name}Registrar',"); + } + } + for (final Class dataClass in root.classes) { + indent.writeln("'${dataClass.name}Bridge',"); + } + indent.writeln( + "'${generatorOptions.swiftOptions.errorClassName ?? 'PigeonError'}'", + ); + indent.dec(); + }); + indent.writeScoped('final enums = [', '];', () { + indent.inc(); + for (final Enum enumType in root.enums) { + indent.writeln("'${enumType.name}',"); + } + if (hasAsyncFlutterApi) { + indent.writeln("'NSURLSessionAuthChallengeDisposition',"); + } + indent.writeln("'${prefix}MyDataType',"); + indent.dec(); + }); + + indent.format(''' + var targetTriple = '${configuredSdkTriple ?? ''}'; + if (targetTriple.isEmpty) { + targetTriple = sdkPath.toLowerCase().contains('macosx') ? 'x86_64-apple-macosx14.0' : 'arm64-apple-ios'; + } + + await SwiftGenerator( + target: Target( + triple: targetTriple, + sdk: Uri.directory( + sdkPath, + ), + ), + inputs: [ObjCCompatibleSwiftFileInput(files: [ + Uri.file('${generatorOptions.swiftOptions.swiftOut}') + ]) + ], + include: (Declaration d) => + classes.contains(d.name) || enums.contains(d.name), + output: Output( + module: '${generatorOptions.swiftOptions.ffiModuleName ?? ''}', + dartFile: Uri.file('${path.posix.join(generatorOptions.basePath ?? '', path.withoutExtension(generatorOptions.dartOut ?? ''))}.ffi.dart'), + objectiveCFile: Uri.file('${path.posix.join(objcDir, '${path.posix.basenameWithoutExtension(generatorOptions.swiftOptions.swiftOut)}.m')}'), + preamble: \''' +// ${generatorOptions.swiftOptions.copyrightHeader?.join('\n// ') ?? ''} + +// ignore_for_file: always_specify_types, camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field +// coverage:ignore-file +\''', + ), + ffigen: FfiGeneratorOptions( + objectiveC: fg.ObjectiveC( + externalVersions: fg.ExternalVersions( + ios: fg.Versions(min: Version(12, 0, 0)), + macos: fg.Versions(min: Version(10, 14, 0)), + ), + interfaces: fg.Interfaces( + include: (fg.Declaration decl) => + classes.contains(decl.originalName) || + enums.contains(decl.originalName), + module: (fg.Declaration decl) { +${hasAsyncFlutterApi ? ''' + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return '${generatorOptions.swiftOptions.ffiModuleName ?? ''}'; + } +''' : ''} + return decl.originalName.startsWith('NS') ? null : '${generatorOptions.swiftOptions.ffiModuleName ?? ''}'; + } + ), + protocols: fg.Protocols( + include: (fg.Declaration decl) => classes.contains(decl.originalName), + module: (fg.Declaration decl) { +${hasAsyncFlutterApi ? ''' + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return '${generatorOptions.swiftOptions.ffiModuleName ?? ''}'; + } +''' : ''} + return decl.originalName.startsWith('NS') ? null : '${generatorOptions.swiftOptions.ffiModuleName ?? ''}'; + }, + ), + ), + ), + ).generate( + logger: null, + tempDirectory: Uri.directory('$objcDir'), + ); + '''); + }); + sink.write(indent.toString()); + } +} diff --git a/packages/pigeon/lib/src/swift/swift_generator.dart b/packages/pigeon/lib/src/swift/swift_generator.dart index 45b968ed4d10..b8c8ac56cdc4 100644 --- a/packages/pigeon/lib/src/swift/swift_generator.dart +++ b/packages/pigeon/lib/src/swift/swift_generator.dart @@ -29,6 +29,11 @@ class SwiftOptions { this.fileSpecificClassNameComponent, this.errorClassName, this.includeErrorClass = true, + this.useFfi = false, + this.ffiModuleName, + this.appDirectory, + this.appleSdkPath, + this.appleSdkTriple, }); /// A copyright header that will get prepended to generated code. @@ -46,6 +51,29 @@ class SwiftOptions { /// Swift file in the same directory. final bool includeErrorClass; + /// Whether to use FFI when possible. + final bool useFfi; + + /// The module name that the FFi classes will use. Required if useFfi is true. + final String? ffiModuleName; + + /// The directory that the app exists in, this is required for FFI APIs. + final String? appDirectory; + + /// The path to the Apple SDK to use for FFI generation. + /// + /// If not provided, Pigeon will attempt to find the iOS SDK path using + /// `xcrun --sdk iphoneos --show-sdk-path`. If that fails, it falls back + /// to a hardcoded default path. + final String? appleSdkPath; + + /// The Apple target triple to use for FFI generation. + /// + /// If not provided, the triple is automatically derived based on the + /// `appleSdkPath`, defaulting to `arm64-apple-ios` (or `x86_64-apple-macosx14.0` + /// if `appleSdkPath` contains "macosx"). + final String? appleSdkTriple; + /// Creates a [SwiftOptions] from a Map representation where: /// `x = SwiftOptions.fromList(x.toMap())`. static SwiftOptions fromList(Map map) { @@ -55,6 +83,11 @@ class SwiftOptions { map['fileSpecificClassNameComponent'] as String?, errorClassName: map['errorClassName'] as String?, includeErrorClass: map['includeErrorClass'] as bool? ?? true, + useFfi: map['useFfi'] as bool? ?? false, + ffiModuleName: map['ffiModuleName'] as String?, + appDirectory: map['appDirectory'] as String?, + appleSdkPath: map['appleSdkPath'] as String?, + appleSdkTriple: map['appleSdkTriple'] as String?, ); } @@ -67,6 +100,11 @@ class SwiftOptions { 'fileSpecificClassNameComponent': fileSpecificClassNameComponent!, if (errorClassName != null) 'errorClassName': errorClassName!, 'includeErrorClass': includeErrorClass, + 'useFfi': useFfi, + if (ffiModuleName != null) 'ffiModuleName': ffiModuleName!, + if (appDirectory != null) 'appDirectory': appDirectory!, + if (appleSdkPath != null) 'appleSdkPath': appleSdkPath!, + if (appleSdkTriple != null) 'appleSdkTriple': appleSdkTriple!, }; return result; } @@ -74,7 +112,7 @@ class SwiftOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [SwiftOptions]. SwiftOptions merge(SwiftOptions options) { - return SwiftOptions.fromList(mergeMaps(toMap(), options.toMap())); + return SwiftOptions.fromList(mergePigeonMaps(toMap(), options.toMap())); } } @@ -87,6 +125,11 @@ class InternalSwiftOptions extends InternalOptions { this.fileSpecificClassNameComponent, this.errorClassName, this.includeErrorClass = true, + this.useFfi = false, + this.ffiModuleName, + this.appDirectory, + this.appleSdkPath, + this.appleSdkTriple, }); /// Creates InternalSwiftOptions from SwiftOptions. @@ -94,12 +137,22 @@ class InternalSwiftOptions extends InternalOptions { SwiftOptions options, { required this.swiftOut, Iterable? copyrightHeader, + String? fileSpecificClassNameComponent, }) : copyrightHeader = options.copyrightHeader ?? copyrightHeader, fileSpecificClassNameComponent = - options.fileSpecificClassNameComponent ?? + (options.useFfi + ? fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent + : options.fileSpecificClassNameComponent ?? + fileSpecificClassNameComponent) ?? swiftOut.split('/').lastOrNull?.split('.').firstOrNull ?? '', errorClassName = options.errorClassName, + useFfi = options.useFfi, + ffiModuleName = options.ffiModuleName, + appDirectory = options.appDirectory, + appleSdkPath = options.appleSdkPath, + appleSdkTriple = options.appleSdkTriple, includeErrorClass = options.includeErrorClass; /// A copyright header that will get prepended to generated code. @@ -119,6 +172,29 @@ class InternalSwiftOptions extends InternalOptions { /// This should only ever be set to false if you have another generated /// Swift file in the same directory. final bool includeErrorClass; + + /// Whether to use FFI when possible. + final bool useFfi; + + /// Module to use for FFI. + final String? ffiModuleName; + + /// The directory that the app exists in, this is required for FFi APIs. + final String? appDirectory; + + /// The path to the Apple SDK to use for FFI generation. + /// + /// If not provided, Pigeon will attempt to find the iOS SDK path using + /// `xcrun --sdk iphoneos --show-sdk-path`. If that fails, it falls back + /// to a hardcoded default path. + final String? appleSdkPath; + + /// The Apple target triple to use for FFI generation. + /// + /// If not provided, the triple is automatically derived based on the + /// `appleSdkPath`, defaulting to `arm64-apple-ios` (or `x86_64-apple-macosx14.0` + /// if `appleSdkPath` contains "macosx"). + final String? appleSdkTriple; } /// Options that control how Swift code will be generated for a specific @@ -181,6 +257,9 @@ class SwiftEventChannelOptions { final bool includeSharedClasses; } +// Prefix used mapping prefixed class names for language outputs. +String _classNamePrefix = ''; + /// Class that manages all Swift code generation. class SwiftGenerator extends StructuredGenerator { /// Instantiates a Swift Generator. @@ -193,6 +272,7 @@ class SwiftGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + _classNamePrefix = generatorOptions.fileSpecificClassNameComponent ?? ''; if (generatorOptions.copyrightHeader != null) { addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); } @@ -212,8 +292,8 @@ class SwiftGenerator extends StructuredGenerator { _writeProxyApiImports(indent, root.apis.whereType()); indent.newln(); - - indent.format(''' + if (!generatorOptions.useFfi) { + indent.format(''' #if os(iOS) import Flutter #elseif os(macOS) @@ -221,6 +301,7 @@ class SwiftGenerator extends StructuredGenerator { #else #error("Unsupported platform.") #endif'''); + } } @override @@ -238,7 +319,9 @@ class SwiftGenerator extends StructuredGenerator { _docCommentSpec, ); - indent.write('enum ${anEnum.name}: Int '); + indent.write( + '${generatorOptions.useFfi ? '@objc ' : ''}enum ${anEnum.name}: Int ', + ); indent.addScoped('{', '}', () { enumerate(anEnum.members, (int index, final EnumMember member) { addDocumentationComments( @@ -251,6 +334,148 @@ class SwiftGenerator extends StructuredGenerator { }); } + void _writeFfiCodec(Indent indent, Root root) { + indent.newln(); + indent.format(''' +@objc class ${_classNamePrefix}PigeonInternalNull: NSObject {} + +@available(iOS 13, macOS 10.15, *) +class _PigeonFfiCodec { + static func readValue(value: NSObject?, type: String? = nil, type2: String? = nil) -> Any? { + if (isNullish(value)) { + return nil + } + if let typedData = value as? ${_classNamePrefix}PigeonTypedData { + switch typedData.type { + case ${_classNamePrefix}MyDataType.uint8.rawValue: + return typedData.toUint8Array() + case ${_classNamePrefix}MyDataType.int32.rawValue: + return typedData.toInt32Array() + case ${_classNamePrefix}MyDataType.int64.rawValue: + return typedData.toInt64Array() + case ${_classNamePrefix}MyDataType.float32.rawValue: + return typedData.toFloat32Array() + case ${_classNamePrefix}MyDataType.float64.rawValue: + return typedData.toFloat64Array() + default: + return typedData + } + } + if value is NSNumber { + let number = value as! NSNumber + if type == "int" || type == "int64" { + return number.int64Value + } else if type == "double" { + return number.doubleValue + } else if type == "bool" { + return number.boolValue + } + ${root.enums.map((Enum enumDefinition) { + return ''' + else if (type == "${enumDefinition.name}") { + return ${enumDefinition.name}.init(rawValue: number.intValue) + }'''; + }).join()} + + return number.int64Value + } + if (value is NSMutableArray || value is NSArray) { + var res: Array = [] + for item in (value as! NSArray) { + res.append(readValue(value: item as? NSObject, type: type)) + } + return res + } + if (value is NSDictionary) { + var res: Dictionary = Dictionary() + for (key, value) in (value as! NSDictionary) { + res[readValue(value: key as? NSObject, type: type) as? AnyHashable] = readValue(value: value as? NSObject, type: type2) + } + return res + } + if (value is ${_classNamePrefix}NumberWrapper) { + return unwrapNumber(wrappedNumber: value as! ${_classNamePrefix}NumberWrapper) + } + if (value is NSString) { + return value as! NSString + ${root.classes.map((Class dataClass) { + return ''' + } else if (value is ${dataClass.name}Bridge) { + return (value! as! ${dataClass.name}Bridge).toSwift(); + '''; + }).join()} + } + return value + } + + static func writeValue(value: Any?, isObject: Bool = false) -> Any? { + if (isNullish(value)) { + return ${_classNamePrefix}PigeonInternalNull() + } + if let uint8Array = value as? [UInt8] { + return isObject ? ${_classNamePrefix}PigeonTypedData(uint8Array) : uint8Array as NSArray + } + if let int32Array = value as? [Int32] { + return isObject ? ${_classNamePrefix}PigeonTypedData(int32Array) : int32Array as NSArray + } + if let int64Array = value as? [Int64] { + return isObject ? ${_classNamePrefix}PigeonTypedData(int64Array) : int64Array as NSArray + } + if let float32Array = value as? [Float32] { + return isObject ? ${_classNamePrefix}PigeonTypedData(float32Array) : float32Array as NSArray + } + if let float64Array = value as? [Double] { + return isObject ? ${_classNamePrefix}PigeonTypedData(float64Array) : float64Array as NSArray + } + if (value is Bool || value is Double || value is Int || value is Int64${root.enums.map((Enum enumDefinition) { + return ' || value is ${enumDefinition.name}'; + }).join()}) { + if (isObject) { + return wrapNumber(number: value!) + } + if (value is Bool) { + return value + } else if (value is Double) { + return value + } else if (value is Int || value is Int64) { + return value + } + ${root.enums.map((Enum enumDefinition) { + return ''' + else if (value is ${enumDefinition.name}) { + return (value as! ${enumDefinition.name}).rawValue + }'''; + }).join()} + } + if (value is [Any]) { + let res: NSMutableArray = NSMutableArray() + for item in (value as! [Any]) { + res.add(isNullish(item) ? ${_classNamePrefix}PigeonInternalNull() : writeValue(value: item, isObject: true) as! NSObject) + } + return res + } + if (value is [AnyHashable: Any]) { + let res: NSMutableDictionary = NSMutableDictionary() + for (key, value) in (value as! [AnyHashable: Any]) { + res.setObject(isNullish(key) ? ${_classNamePrefix}PigeonInternalNull() : writeValue(value: value, isObject: true) as! NSObject, forKey: writeValue(value: key, isObject: true) as! NSCopying) + } + return res + } + if (value is String) { + return value as! NSString + ${root.classes.map((Class dataClass) { + return ''' + } else if (value is ${dataClass.name}) { + return ${dataClass.name}Bridge.fromSwift(value as? ${dataClass.name}); + '''; + }).join()} + } + return value + } +} + '''); + } + @override void writeGeneralCodec( InternalSwiftOptions generatorOptions, @@ -258,6 +483,12 @@ class SwiftGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + if (generatorOptions.useFfi && + !root.containsEventChannel && + !root.containsProxyApi) { + _writeFfiCodec(indent, root); + return; + } final String codecName = _getMessageCodecName(generatorOptions); final readerWriterName = '${codecName}ReaderWriter'; final readerName = '${codecName}Reader'; @@ -417,17 +648,27 @@ class SwiftGenerator extends StructuredGenerator { Indent indent, Class classDefinition, { bool private = false, + bool useFfi = false, + bool useFfiTypedData = false, bool hashable = true, }) { final privateString = private ? 'private ' : ''; - final extendsString = classDefinition.superClass != null - ? ': ${classDefinition.superClass!.name}' - : hashable - ? ': Hashable' - : ''; - if (classDefinition.isSwiftClass) { + final objcString = useFfi ? '@objc ' : ''; + final bridge = useFfi ? 'Bridge' : ''; + var extendsString = ''; + if (useFfi) { + extendsString += ': NSObject'; + } + if (classDefinition.superClass != null) { + extendsString += useFfi ? ', ' : ': '; + extendsString += classDefinition.superClass!.name; + } else if (hashable) { + extendsString += useFfi ? ', ' : ': '; + extendsString += useFfi ? 'Hashable' : 'Hashable'; + } + if (classDefinition.isSwiftClass || useFfi) { indent.write( - '${privateString}class ${classDefinition.name}$extendsString ', + '$privateString${objcString}class ${classDefinition.name}$bridge$extendsString ', ); } else if (classDefinition.isSealed) { indent.write('protocol ${classDefinition.name} '); @@ -442,8 +683,14 @@ class SwiftGenerator extends StructuredGenerator { classDefinition, ); - if (classDefinition.isSwiftClass) { - _writeClassInit(indent, fields.toList()); + if (classDefinition.isSwiftClass || useFfi) { + _writeClassInit( + indent, + fields.toList(), + objcString, + useFfi: useFfi, + useFfiTypedData: useFfiTypedData, + ); } for (final field in fields) { @@ -452,8 +699,14 @@ class SwiftGenerator extends StructuredGenerator { field.documentationComments, _docCommentSpec, ); - indent.write('var '); - _writeClassField(indent, field, addNil: !classDefinition.isSwiftClass); + indent.write('${objcString}var '); + _writeClassField( + indent, + field, + addNil: !classDefinition.isSwiftClass, + useFfi: useFfi, + useFfiTypedData: useFfiTypedData, + ); indent.newln(); } }, addTrailingNewline: false); @@ -566,7 +819,11 @@ if (wrapped == nil) { _docCommentSpec, generatorComments: generatedComments, ); - _writeDataClassSignature(indent, classDefinition); + _writeDataClassSignature( + indent, + classDefinition, + useFfiTypedData: generatorOptions.useFfi, + ); indent.writeScoped('', '}', () { if (classDefinition.isSealed) { return; @@ -578,6 +835,7 @@ if (wrapped == nil) { indent, classDefinition, dartPackageName: dartPackageName, + useFfi: generatorOptions.useFfi, ); writeClassEncode( generatorOptions, @@ -594,13 +852,223 @@ if (wrapped == nil) { dartPackageName: dartPackageName, ); }); + if (generatorOptions.useFfi) { + _writeFfiBridgeClass( + generatorOptions, + root, + indent, + classDefinition, + dartPackageName: dartPackageName, + ); + } } - void _writeClassInit(Indent indent, List fields) { - indent.writeScoped('init(', ')', () { + void _writeFfiBridgeClass( + InternalSwiftOptions generatorOptions, + Root root, + Indent indent, + Class classDefinition, { + required String dartPackageName, + }) { + final generatedComments = [ + ' Generated bridge class from Pigeon that moves data from Swift to Objective-C.', + ]; + indent.newln(); + addDocumentationComments( + indent, + classDefinition.documentationComments, + _docCommentSpec, + generatorComments: generatedComments, + ); + indent.writeln('@available(iOS 13, macOS 10.15, *)'); + _writeDataClassSignature( + indent, + classDefinition, + useFfi: true, + hashable: false, + ); + indent.writeScoped('', '}', () { + if (classDefinition.isSealed) { + return; + } + indent.writeln('// swift-format-ignore: AlwaysUseLowerCamelCase'); + indent.writeScoped( + 'static func fromSwift(_ ${varNamePrefix}Class: ${classDefinition.name}?) -> ${classDefinition.name}Bridge? {', + '}', + () { + indent.writeScoped( + 'if (isNullish(${varNamePrefix}Class)) {', + '}', + () { + indent.writeln('return nil'); + }, + ); + indent.writeScoped('return ${classDefinition.name}Bridge(', ')', () { + for (final NamedType field in classDefinition.fields) { + indent.writeln( + '${field.name}: ${_varToObjc('${varNamePrefix}Class!.${field.name}', field.type)},', + ); + } + }); + }, + ); + indent.writeScoped( + 'func toSwift() -> ${classDefinition.name} {', + '}', + () { + indent.writeScoped('return ${classDefinition.name} (', ')', () { + for (final NamedType field in classDefinition.fields) { + indent.writeln( + '${field.name}: ${_varToSwift(field.name, field.type)},', + ); + } + }); + }, + ); + }); + } + + String _varToObjc( + String varName, + TypeDeclaration type, { + bool forceNullable = false, + }) { + final nullable = type.isNullable || forceNullable ? '?' : ''; + final getter = type.isNullable ? '!' : ''; + switch (type.baseName) { + case 'int': + case 'double': + case 'bool': + return type.isNullable || forceNullable + ? _numberToObjc( + varName, + getter: getter, + isNullable: type.isNullable, + ) + : varName; + case 'Uint8List': + case 'Int32List': + case 'Int64List': + case 'Float32List': + case 'Float64List': + return wrapConditionally( + '${_classNamePrefix}PigeonTypedData($varName${type.isNullable ? '!' : ''})', + 'isNullish($varName) ? nil : ', + '', + type.isNullable || forceNullable, + ); + case 'String': + return '$varName as NSString$nullable'; + case 'List': + case 'Map': + return '_PigeonFfiCodec.writeValue(value: $varName) as${type.isNullable || forceNullable ? '?' : '!'} ${_swiftTypeForBuiltinDartType(type, useFfi: true)}'; + case 'Object': + return '_PigeonFfiCodec.writeValue(value: $varName, isObject: true) as${type.isNullable || forceNullable ? '?' : '!'} NSObject'; + default: + if (type.isEnum && (type.isNullable || forceNullable)) { + return _numberToObjc( + varName, + getter: getter.isEmpty ? '.rawValue' : '!.rawValue', + isNullable: type.isNullable, + ); + } + if (type.isClass) { + return '${type.baseName}Bridge.fromSwift($varName)${type.isNullable ? '' : '!'}'; + } + return varName; + } + } + + String _numberToObjc( + String varName, { + String getter = '', + bool isNullable = true, + }) => isNullable + ? 'isNullish($varName) ? nil : NSNumber(value: $varName$getter)' + : 'NSNumber(value: $varName$getter)'; + + String _varToSwift( + String varName, + TypeDeclaration type, { + bool forceNullable = false, + }) { + final nullable = type.isNullable ? '?' : ''; + final checkNullish = type.isNullable || forceNullable + ? 'isNullish($varName) ? nil : ' + : ''; + switch (type.baseName) { + case 'Object': + return '_PigeonFfiCodec.readValue(value: $varName)${type.isNullable || forceNullable ? '' : '!'}'; + case 'int': + return type.isNullable || forceNullable + ? '$checkNullish$varName!.int64Value' + : varName; + case 'double': + return type.isNullable || forceNullable + ? '$checkNullish$varName!.doubleValue' + : varName; + case 'bool': + return type.isNullable || forceNullable + ? '$checkNullish$varName!.boolValue' + : varName; + case 'Uint8List': + return '$checkNullish$varName${type.isNullable || forceNullable ? '!' : ''}.toUint8Array()${type.isNullable || forceNullable ? '' : '!'}'; + case 'Int32List': + return '$checkNullish$varName${type.isNullable || forceNullable ? '!' : ''}.toInt32Array()${type.isNullable || forceNullable ? '' : '!'}'; + case 'Int64List': + return '$checkNullish$varName${type.isNullable || forceNullable ? '!' : ''}.toInt64Array()${type.isNullable || forceNullable ? '' : '!'}'; + case 'Float32List': + return '$checkNullish$varName${type.isNullable || forceNullable ? '!' : ''}.toFloat32Array()${type.isNullable || forceNullable ? '' : '!'}'; + case 'Float64List': + return '$checkNullish$varName${type.isNullable || forceNullable ? '!' : ''}.toFloat64Array()${type.isNullable || forceNullable ? '' : '!'}'; + case 'String': + return '$varName as String$nullable'; + case 'List': + case 'Map': + final typeArg = + type.typeArguments.isNotEmpty && + type.typeArguments.first.baseName != 'List' && + type.typeArguments.first.baseName != 'Map' + ? ', type: "${type.typeArguments.first.baseName}"' + : ''; + final type2Arg = + type.typeArguments.length > 1 && + type.typeArguments.last.baseName != 'List' && + type.typeArguments.last.baseName != 'Map' + ? ', type2: "${type.typeArguments.last.baseName}"' + : ''; + return '_PigeonFfiCodec.readValue(value: $varName as NSObject$nullable$typeArg$type2Arg) as${type.isNullable || forceNullable ? '?' : '!'} ${_swiftTypeForBuiltinDartType(type)}'; + default: + if (type.isEnum) { + return type.isNullable || forceNullable + ? '$checkNullish${type.baseName}.init(rawValue: $varName!.intValue)' + : varName; + } + if (type.isClass) { + return '$checkNullish$varName${nullable.isEmpty ? '' : '!'}.toSwift()'; + } + return varName; + } + } + + ////////// + + void _writeClassInit( + Indent indent, + List fields, + String objc, { + bool useFfi = false, + bool useFfiTypedData = false, + }) { + indent.writeScoped('${objc}init(', ')', () { for (var i = 0; i < fields.length; i++) { indent.write(''); - _writeClassField(indent, fields[i]); + _writeClassField( + indent, + fields[i], + useFfi: useFfi, + useFfiTypedData: useFfiTypedData, + ); if (i == fields.length - 1) { indent.newln(); } else { @@ -610,18 +1078,29 @@ if (wrapped == nil) { }, addTrailingNewline: false); indent.addScoped(' {', '}', () { for (final field in fields) { - _writeClassFieldInit(indent, field); + _writeClassFieldInit(indent, field, useFfiTypedData: useFfiTypedData); } }); } - void _writeClassField(Indent indent, NamedType field, {bool addNil = true}) { - indent.add('${field.name}: ${_nullSafeSwiftTypeForDartType(field.type)}'); + void _writeClassField( + Indent indent, + NamedType field, { + bool addNil = true, + bool useFfi = false, + bool useFfiTypedData = false, + }) { final defaultNil = field.type.isNullable && addNil ? ' = nil' : ''; - indent.add(defaultNil); + indent.add( + '${field.name}: ${_nullSafeSwiftTypeForDartType(field.type, useFfi: useFfi, ffiTypedData: useFfiTypedData)}$defaultNil', + ); } - void _writeClassFieldInit(Indent indent, NamedType field) { + void _writeClassFieldInit( + Indent indent, + NamedType field, { + bool useFfiTypedData = false, + }) { indent.writeln('self.${field.name} = ${field.name}'); } @@ -711,6 +1190,7 @@ if (wrapped == nil) { Indent indent, Class classDefinition, { required String dartPackageName, + bool useFfi = false, }) { final String className = classDefinition.name; indent.writeln('// swift-format-ignore: AlwaysUseLowerCamelCase'); @@ -729,8 +1209,9 @@ if (wrapped == nil) { indent: indent, value: listValue, variableName: field.name, - fieldType: _swiftTypeForDartType(field.type), + fieldType: _swiftTypeForDartType(field.type, ffiTypedData: useFfi), type: field.type, + ffiTypedData: useFfi, ); }); @@ -776,6 +1257,11 @@ if (wrapped == nil) { )) { indent.newln(); } + if (generatorOptions.useFfi) { + indent.writeln( + 'let defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u";', + ); + } super.writeApis( generatorOptions, root, @@ -799,6 +1285,7 @@ if (wrapped == nil) { AstFlutterApi api, { required String dartPackageName, }) { + indent.newln(); const generatedComments = [ ' Generated protocol from Pigeon that represents Flutter messages that can be called from Swift.', ]; @@ -809,6 +1296,17 @@ if (wrapped == nil) { generatorComments: generatedComments, ); + if (generatorOptions.useFfi) { + _writeFfiFlutterApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + return; + } + indent.addScoped('protocol ${api.name}Protocol {', '}', () { for (final Method func in api.methods) { addDocumentationComments( @@ -869,6 +1367,274 @@ if (wrapped == nil) { }); } + void _writeFfiFlutterApi( + InternalSwiftOptions generatorOptions, + Root root, + Indent indent, + AstFlutterApi api, { + required String dartPackageName, + }) { + final String errorClassName = _getErrorClassName(generatorOptions); + indent.writeln('@available(iOS 13, macOS 10.15, *)'); + indent.write('@objc protocol ${api.name}Bridge '); + indent.addScoped('{', '}', () { + for (final Method method in api.methods) { + addDocumentationComments( + indent, + method.documentationComments, + _docCommentSpec, + ); + final List parameters = method.parameters.map(( + NamedType param, + ) { + return '${param.name}: ${_nullSafeFfiTypeForDartType(param.type, forceNullable: true)}'; + }).toList(); + parameters.add('error: $errorClassName'); + + if (method.isAsynchronous) { + final returnType = method.returnType.isVoid + ? '' + : ' -> ${_nullSafeFfiTypeForDartType(method.returnType, forceNullable: true)}'; + indent.writeln( + '@objc func ${method.name}(${parameters.join(', ')}) async$returnType', + ); + } else { + final returnType = method.returnType.isVoid + ? '' + : ' -> ${_nullSafeFfiTypeForDartType(method.returnType, forceNullable: true)}'; + indent.writeln( + '@objc func ${method.name}(${parameters.join(', ')})$returnType', + ); + } + } + }); + + indent.newln(); + indent.writeln('@available(iOS 13, macOS 10.15, *)'); + indent.write('@objc class ${api.name}Registrar: NSObject '); + indent.addScoped('{', '}', () { + indent.writeln( + 'static var registered${api.name} = [String: ${api.name}]()', + ); + indent.newln(); + indent.write( + '@objc static func registerInstance(api: ${api.name}Bridge, name: String = defaultInstanceName) ', + ); + indent.addScoped('{', '}', () { + indent.writeln( + '${api.name}Registrar.registered${api.name}[name] = ${api.name}(api: api)', + ); + }); + indent.newln(); + indent.write( + 'static func getInstance(name: String = defaultInstanceName) -> ${api.name}? ', + ); + indent.addScoped('{', '}', () { + indent.writeln( + 'return ${api.name}Registrar.registered${api.name}[name]', + ); + }); + }); + + indent.newln(); + indent.writeln('@available(iOS 13, macOS 10.15, *)'); + indent.write('class ${api.name} '); + indent.addScoped('{', '}', () { + indent.writeln('private let api: ${api.name}Bridge?'); + indent.newln(); + indent.write('fileprivate init(api: ${api.name}Bridge) '); + indent.addScoped('{', '}', () { + indent.writeln('self.api = api'); + }); + indent.newln(); + indent.write( + 'static func getInstance(name: String = defaultInstanceName) -> ${api.name}? ', + ); + indent.addScoped('{', '}', () { + indent.writeln('return ${api.name}Registrar.getInstance(name: name)'); + }); + + for (final Method method in api.methods) { + indent.newln(); + addDocumentationComments( + indent, + method.documentationComments, + _docCommentSpec, + ); + final returnTypeString = method.returnType.isVoid + ? '' + : ' -> ${_nullSafeSwiftTypeForDartType(method.returnType, ffiTypedData: true)}'; + final String parameters = method.parameters + .map((NamedType param) { + return '${param.name}: ${_nullSafeSwiftTypeForDartType(param.type, ffiTypedData: true)}'; + }) + .join(', '); + final asyncString = method.isAsynchronous ? ' async' : ''; + indent.write( + 'func ${method.name}($parameters)$asyncString throws$returnTypeString ', + ); + indent.addScoped('{', '}', () { + indent.writeln('let error = $errorClassName()'); + final List params = method.parameters.map((NamedType param) { + return '${param.name}: ${_varToObjc(param.name, param.type, forceNullable: true)}'; + }).toList(); + params.add('error: error'); + + if (method.isAsynchronous) { + if (method.returnType.isVoid) { + indent.writeln('await api!.${method.name}(${params.join(', ')})'); + } else { + indent.writeln( + 'let res = await api!.${method.name}(${params.join(', ')})', + ); + } + } else { + if (method.returnType.isVoid) { + indent.writeln('api!.${method.name}(${params.join(', ')})'); + } else { + indent.writeln( + 'let res = api!.${method.name}(${params.join(', ')})', + ); + } + } + indent.writeScoped('if (error.code != nil) {', '}', () { + indent.writeln('throw error'); + }); + if (!method.returnType.isVoid) { + final String swiftType = _nullSafeSwiftTypeForDartType( + method.returnType, + ffiTypedData: true, + ); + final valueCast = + (method.returnType.baseName == 'List' || + method.returnType.baseName == 'Map') + ? ' as NSObject?' + : ''; + final String cast; + if (swiftType == 'Any') { + cast = '!'; + } else if (swiftType == 'Any?') { + cast = ''; + } else { + cast = ' as! $swiftType'; + } + indent.writeln( + 'return _PigeonFfiCodec.readValue(value: (res$valueCast), type: "${method.returnType.baseName}")$cast', + ); + } + }); + } + }); + } + + void _writeFfiHostApi( + InternalSwiftOptions generatorOptions, + Root root, + Indent indent, + AstHostApi api, { + required String dartPackageName, + }) { + indent.newln(); + indent.writeln( + '$_docCommentPrefix Generated setup class from Pigeon to register implemented ${api.name} classes.', + ); + indent.writeln('@available(iOS 13, macOS 10.15, *)'); + indent.writeScoped('@objc class ${api.name}Setup: NSObject {', '}', () { + if (generatorOptions.useFfi) { + indent.writeln('private var api: ${api.name}?'); + indent.writeln('override init() {}'); + indent.writeScoped( + 'static func register(api: ${api.name}?, name: String = defaultInstanceName) {', + '}', + () { + indent.writeln('let wrapper = ${api.name}Setup()'); + indent.writeln('wrapper.api = api'); + indent.writeln( + '${api.name}InstanceTracker.instancesOf${api.name}[name] = wrapper', + ); + }, + ); + indent.writeScoped( + '@objc static func getInstance(name: String) -> ${api.name}Setup? {', + '}', + () { + indent.writeln( + 'return ${api.name}InstanceTracker.instancesOf${api.name}[name] ?? nil', + ); + }, + ); + } + for (final Method method in api.methods) { + addDocumentationComments( + indent, + method.documentationComments, + _docCommentSpec, + ); + final components = _SwiftFunctionComponents( + name: method.name, + parameters: method.parameters, + returnType: method.returnType, + swiftFunction: method.swiftFunction, + ); + indent.write( + _getMethodSignature( + name: method.name, + parameters: method.parameters, + returnType: method.returnType, + errorTypeName: generatorOptions.errorClassName ?? 'Error', + ffiBridgeApi: generatorOptions.useFfi, + isAsynchronous: method.isAsynchronous, + swiftFunction: method.swiftFunction, + components: components, + ), + ); + indent.addScoped(' {', '}', () { + indent.writeScoped('do {', '}', () { + if ((method.returnType.isNullable && method.returnType.isEnum) || + method.returnType.baseName == 'Uint8List' || + method.returnType.baseName == 'Int32List' || + method.returnType.baseName == 'Int64List' || + method.returnType.baseName == 'Float32List' || + method.returnType.baseName == 'Float64List') { + indent.writeln( + 'let res = try ${method.isAsynchronous ? 'await ' : ''}api!.${components.name}(${components.arguments.map((_SwiftFunctionArgument param) { + return '${param.label == "_" || param.label == null ? "" : param.label}${param.label != null ? "" : param.name}${param.label != "_" ? ": " : ""}${_varToSwift(param.name, param.type)}'; + }).join(', ')})${method.returnType.isEnum ? '?.rawValue' : ''}', + ); + indent.writeln( + 'return isNullish(res) ? nil : ${method.returnType.isEnum ? 'NSNumber(value: res!)' : '${_classNamePrefix}PigeonTypedData(res${method.returnType.isNullable ? '!' : ''})'}', + ); + } else { + indent.writeln( + 'return try ${method.isAsynchronous ? 'await ' : ''}${_varToObjc('api!.${components.name}(${components.arguments.map((_SwiftFunctionArgument param) { + return '${param.label == "_" || param.label == null ? "" : param.label}${param.label != null ? "" : param.name}${param.label != "_" ? ": " : ""}${_varToSwift(param.name, param.type)}'; + }).join(', ')})', method.returnType, forceNullable: true)}', + ); + } + }, addTrailingNewline: false); + indent.addScoped( + ' catch let error as ${_getErrorClassName(generatorOptions)} {', + '}', + () { + indent.writeln('wrappedError.code = error.code'); + indent.writeln('wrappedError.message = error.message'); + indent.writeln('wrappedError.details = error.details'); + }, + addTrailingNewline: false, + ); + indent.addScoped(' catch let error {', '}', () { + indent.writeln(r'wrappedError.code = "\(error)"'); + indent.writeln(r'wrappedError.message = "\(type(of: error))"'); + indent.writeln( + r'wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)"', + ); + }); + indent.writeln('return${method.returnType.isVoid ? '' : ' nil'}'); + }); + } + }); + } + /// Write the swift code that represents a host [Api], [api]. /// Example: /// protocol Foo { @@ -883,6 +1649,14 @@ if (wrapped == nil) { required String dartPackageName, }) { final String apiName = api.name; + if (generatorOptions.useFfi) { + indent.format(''' + @available(iOS 13, macOS 10.15, *) + class ${apiName}InstanceTracker { + static var instancesOf$apiName = [String: ${apiName}Setup?]() + } + '''); + } const generatedComments = [ ' Generated protocol from Pigeon that represents a handler of messages from Flutter.', @@ -894,6 +1668,9 @@ if (wrapped == nil) { generatorComments: generatedComments, ); + if (generatorOptions.useFfi) { + indent.writeln('@available(iOS 13, macOS 10.15, *)'); + } indent.write('protocol $apiName '); indent.addScoped('{', '}', () { for (final Method method in api.methods) { @@ -910,17 +1687,26 @@ if (wrapped == nil) { errorTypeName: 'Error', isAsynchronous: method.isAsynchronous, swiftFunction: method.swiftFunction, + ffiUserApi: generatorOptions.useFfi, ), ); } }); - + if (generatorOptions.useFfi) { + _writeFfiHostApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + return; + } indent.newln(); indent.writeln( '$_docCommentPrefix Generated setup class from Pigeon to handle messages through the `binaryMessenger`.', ); - indent.write('class ${apiName}Setup '); - indent.addScoped('{', '}', () { + indent.writeScoped('class ${apiName}Setup {', '}', () { indent.writeln( 'static var codec: FlutterStandardMessageCodec { ${_getMessageCodecName(generatorOptions)}.shared }', ); @@ -1399,7 +2185,11 @@ if (wrapped == nil) { ); } - String _castForceUnwrap(String value, TypeDeclaration type) { + String _castForceUnwrap( + String value, + TypeDeclaration type, { + bool ffiTypedData = false, + }) { assert(!type.isVoid); if (type.baseName == 'Object') { return value + (type.isNullable ? '' : '!'); @@ -1407,11 +2197,11 @@ if (wrapped == nil) { // It needs soft-casting followed by force unwrapping. } else if (type.baseName == 'Map' && type.typeArguments.any((TypeDeclaration type) => type.isEnum)) { - return '$value as? ${_swiftTypeForDartType(type)}'; + return '$value as? ${_swiftTypeForDartType(type, ffiTypedData: ffiTypedData)}'; } else if (type.isNullable) { return 'nilOrValue($value)'; } else { - return '$value as! ${_swiftTypeForDartType(type)}'; + return '$value as! ${_swiftTypeForDartType(type, ffiTypedData: ffiTypedData)}'; } } @@ -1421,22 +2211,33 @@ if (wrapped == nil) { required String variableName, required String fieldType, required TypeDeclaration type, + bool ffiTypedData = false, }) { if (type.isNullable) { indent.writeln( - 'let $variableName: $fieldType? = ${_castForceUnwrap(value, type)}', + 'let $variableName: $fieldType? = ${_castForceUnwrap(value, type, ffiTypedData: ffiTypedData)}', ); } else { - indent.writeln('let $variableName = ${_castForceUnwrap(value, type)}'); + indent.writeln( + 'let $variableName = ${_castForceUnwrap(value, type, ffiTypedData: ffiTypedData)}', + ); } } - void _writeIsNullish(Indent indent) { + void _writeIsNullish(Indent indent, {bool useFfi = false}) { indent.newln(); - indent.write('private func isNullish(_ value: Any?) -> Bool '); - indent.addScoped('{', '}', () { - indent.writeln('return value is NSNull || value == nil'); - }); + indent.format(''' + private func isNullish(_ value: Any?) -> Bool { + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull${useFfi ? ' || innerValue is ${_classNamePrefix}PigeonInternalNull' : ''} + }'''); } void _writeWrapResult(Indent indent) { @@ -1627,6 +2428,237 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { '''); } + void _writeNumberWrapper(Root root, Indent indent) { + indent.newln(); + indent.writeScoped( + '@objc class ${_classNamePrefix}NumberWrapper: NSObject, NSCopying {', + '}', + () { + indent.writeScoped('@objc required init(', ')', () { + indent.writeln('number: NSNumber,'); + indent.writeln('type: Int,'); + }, addTrailingNewline: false); + indent.writeScoped('{', '}', () { + indent.writeln('self.number = number'); + indent.writeln('self.type = type'); + }); + indent.writeScoped( + 'func copy(with zone: NSZone? = nil) -> Any {', + '}', + () { + indent.writeln('return Self(number: number, type: type)'); + }, + ); + + indent.writeln('@objc var number: NSNumber'); + indent.writeln('@objc var type: Int'); + indent.format(''' + static func == (lhs: ${_classNamePrefix}NumberWrapper, rhs: ${_classNamePrefix}NumberWrapper) -> Bool { + return lhs.number == rhs.number && lhs.type == rhs.type + } + + override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? ${_classNamePrefix}NumberWrapper else { + return false + } + return self == other + } + + override var hash: Int { + return number.hashValue ^ type.hashValue + } + '''); + }, + ); + indent.newln(); + indent.writeScoped( + 'private func wrapNumber(number: Any) -> ${_classNamePrefix}NumberWrapper {', + '}', + () { + indent.writeScoped('switch number {', '}', () { + var caseNum = 4; + indent.format(''' + case let value as Int: + return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Int64: + return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Double: + return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Float: + return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Bool: + return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: value), type: 3) +'''); + for (final Enum anEnum in root.enums) { + indent.writeln('case let value as ${anEnum.name}:'); + indent.inc(); + indent.writeln( + 'return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: value.rawValue), type: ${caseNum++})', + ); + indent.dec(); + } + indent.writeln('default:'); + indent.inc(); + indent.writeln( + 'return ${_classNamePrefix}NumberWrapper(number: NSNumber(value: 0), type: 0)', + ); + indent.dec(); + }); + }, + ); + indent.newln(); + indent.writeScoped( + 'private func unwrapNumber(wrappedNumber: ${_classNamePrefix}NumberWrapper) -> Any {', + '}', + () { + indent.writeScoped('switch wrappedNumber.type {', '}', () { + var caseNum = 4; + indent.format(''' + case 1: + return wrappedNumber.number.int64Value + case 2: + return wrappedNumber.number.doubleValue + case 3: + return wrappedNumber.number.boolValue'''); + for (final Enum anEnum in root.enums) { + indent.writeln('case ${caseNum++}:'); + indent.inc(); + indent.writeln( + 'return ${anEnum.name}(rawValue: wrappedNumber.number.intValue)!', + ); + indent.dec(); + } + indent.writeln('default:'); + indent.inc(); + indent.writeln('return wrappedNumber.number.int64Value'); + indent.dec(); + }); + }, + ); + indent.newln(); + indent.writeScoped( + 'private func numberCodec(number: Any) -> Int {', + '}', + () { + indent.writeScoped('switch number {', '}', () { + var caseNum = 4; + indent.format(''' + case is Int: + return 1 + case is Double: + return 2 + case is Float: + return 2 + case is Bool: + return 3'''); + for (final Enum anEnum in root.enums) { + indent.writeln('case is ${anEnum.name}:'); + indent.inc(); + indent.writeln('return ${caseNum++}'); + indent.dec(); + } + indent.writeln('default:'); + indent.inc(); + indent.writeln('return 0'); + indent.dec(); + }); + }, + ); + + indent.format(''' +// Enum to represent the Dart TypedData types +enum ${_classNamePrefix}MyDataType: Int { + case uint8 = 0 + case int32 = 1 + case int64 = 2 + case float32 = 3 + case float64 = 4 +} + +@available(iOS 13, macOS 10.15, *) +@objc public class ${_classNamePrefix}PigeonTypedData: NSObject { + @objc public let data: NSData + @objc public let type: Int + + @objc public init(data: NSData, type: Int) { + self.data = data + self.type = type + } + + public init(_ data: [UInt8]) { + self.data = NSData(bytes: data, length: data.count) + self.type = ${_classNamePrefix}MyDataType.uint8.rawValue + } + + public init(_ data: [Int32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}MyDataType.int32.rawValue + } + + public init(_ data: [Int64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}MyDataType.int64.rawValue + } + + public init(_ data: [Float32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}MyDataType.float32.rawValue + } + + public init(_ data: [Float64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}MyDataType.float64.rawValue + } + + /// Returns the data as a [UInt8] array, if the type is .uint8 + public func toUint8Array() -> [UInt8]? { + guard type == ${_classNamePrefix}MyDataType.uint8.rawValue else { return nil } + return [UInt8](data as Data) + } + + /// Returns the data as a [Int32] array, if the type is .int32 + public func toInt32Array() -> [Int32]? { + guard type == ${_classNamePrefix}MyDataType.int32.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Int32](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } + + /// Returns the data as a [Int64] array, if the type is .int64 + public func toInt64Array() -> [Int64]? { + guard type == ${_classNamePrefix}MyDataType.int64.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Int64](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } + + /// Returns the data as a [Float32] array, if the type is .float32 + public func toFloat32Array() -> [Float32]? { + guard type == ${_classNamePrefix}MyDataType.float32.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Float32](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } + + /// Returns the data as a [Float64] array (Array), if the type is .float64 + public func toFloat64Array() -> [Double]? { + guard type == ${_classNamePrefix}MyDataType.float64.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Double](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } +} + '''); + } + @override void writeGeneralUtilities( InternalSwiftOptions generatorOptions, @@ -1638,15 +2670,19 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { _writePigeonError(generatorOptions, indent); } - if (root.containsHostApi || root.containsProxyApi) { + if ((root.containsHostApi && !generatorOptions.useFfi) || + root.containsProxyApi) { _writeWrapResult(indent); _writeWrapError(generatorOptions, indent); } if (root.containsFlutterApi || root.containsProxyApi) { _writeCreateConnectionError(generatorOptions, indent); } + if (generatorOptions.useFfi) { + _writeNumberWrapper(root, indent); + } - _writeIsNullish(indent); + _writeIsNullish(indent, useFfi: generatorOptions.useFfi); _writeNilOrValue(indent); if (root.classes.isNotEmpty) { _writeDeepEquals(generatorOptions, indent); @@ -1662,6 +2698,7 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { required String dartPackageName, }) { indent.newln(); + // TODO(tarrinneal): Prefix this class to avoid name collisions. indent.format(''' private class PigeonStreamHandler: NSObject, FlutterStreamHandler { private let wrapper: PigeonEventChannelWrapper @@ -1686,6 +2723,7 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { } }'''); if (api.swiftOptions?.includeSharedClasses ?? true) { + // TODO(tarrinneal): Prefix these classes to avoid name collisions. indent.format(''' class PigeonEventChannelWrapper { @@ -2058,6 +3096,7 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { }'''); indent.newln(); + // TODO(tarrinneal): Prefix this class to avoid name collisions. indent.format(''' private class InstanceManagerApiFinalizerDelegate: ${instanceManagerFinalizerDelegateName(generatorOptions)} { let api: $instanceManagerApiName @@ -2816,20 +3855,30 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { } void _writePigeonError(InternalSwiftOptions generatorOptions, Indent indent) { + final objc = generatorOptions.useFfi ? '@objc ' : ''; indent.newln(); indent.writeln( '/// Error class for passing custom error details to Dart side.', ); indent.writeScoped( - 'final class ${_getErrorClassName(generatorOptions)}: Error {', + '${objc}final class ${_getErrorClassName(generatorOptions)}: ${generatorOptions.useFfi ? 'NSObject, ' : ''}Error {', '}', () { - indent.writeln('let code: String'); - indent.writeln('let message: String?'); - indent.writeln('let details: Sendable?'); + final declaration = generatorOptions.useFfi ? '${objc}var' : 'let'; + indent.writeln( + '$declaration code: String${generatorOptions.useFfi ? '?' : ''}', + ); + indent.writeln('$declaration message: String?'); + indent.writeln( + '$declaration details: ${generatorOptions.useFfi ? 'String' : 'Sendable'}?', + ); + if (generatorOptions.useFfi) { + indent.newln(); + indent.writeln('@objc override init() {}'); + } indent.newln(); indent.writeScoped( - 'init(code: String, message: String?, details: Sendable?) {', + '${objc}init(code: String${generatorOptions.useFfi ? '?' : ''}, message: String?, details: ${generatorOptions.useFfi ? 'String' : 'Sendable'}?) {', '}', () { indent.writeln('self.code = code'); @@ -2841,7 +3890,7 @@ func $deepHashName(value: Any?, hasher: inout Hasher) { indent.writeScoped('var localizedDescription: String {', '}', () { indent.writeScoped('return', '', () { indent.writeln( - '"${_getErrorClassName(generatorOptions)}(code: \\(code), message: \\(message ?? ""), details: \\(details ?? "")"', + '"${_getErrorClassName(generatorOptions)}(code: \\(code${generatorOptions.useFfi ? ' ?? ""' : ''}), message: \\(message ?? ""), details: \\(details ?? "")"', ); }, addTrailingNewline: false); }); @@ -3011,11 +4060,22 @@ String _camelCase(String text) { /// Converts a [List] of [TypeDeclaration]s to a comma separated [String] to be /// used in Swift code. -String _flattenTypeArguments(List args) { - return args.map((TypeDeclaration e) => _swiftTypeForDartType(e)).join(', '); +String _flattenSwiftTypeArguments( + List args, { + bool useFfi = false, +}) { + return args + .map((TypeDeclaration e) => _swiftTypeForDartType(e, useFfi: useFfi)) + .join(', '); } -String _swiftTypeForBuiltinGenericDartType(TypeDeclaration type) { +String _swiftTypeForBuiltinGenericDartType( + TypeDeclaration type, { + bool useFfi = false, +}) { + if (useFfi) { + return _ffiTypeForBuiltinGenericDartType(type); + } if (type.typeArguments.isEmpty) { if (type.baseName == 'List') { return '[Any?]'; @@ -3030,14 +4090,27 @@ String _swiftTypeForBuiltinGenericDartType(TypeDeclaration type) { } else if (type.baseName == 'Map') { return '[${_nullSafeSwiftTypeForDartType(type.typeArguments.first, mapKey: true)}: ${_nullSafeSwiftTypeForDartType(type.typeArguments.last)}]'; } else { - return '${type.baseName}<${_flattenTypeArguments(type.typeArguments)}>'; + return '${type.baseName}<${_flattenSwiftTypeArguments(type.typeArguments)}>'; } } } +String _ffiTypeForBuiltinGenericDartType(TypeDeclaration type) { + // if (type.typeArguments.isEmpty) { + if (type.baseName == 'List') { + return '[NSObject]'; + } else if (type.baseName == 'Map') { + return '[NSObject: NSObject]'; + } else { + return 'NSObject'; + } +} + String? _swiftTypeForBuiltinDartType( TypeDeclaration type, { bool mapKey = false, + bool useFfi = false, + bool ffiTypedData = false, }) { const swiftTypeForDartTypeMap = { 'void': 'Void', @@ -3053,11 +4126,72 @@ String? _swiftTypeForBuiltinDartType( 'Object': 'Any', }; if (mapKey && type.baseName == 'Object') { - return 'AnyHashable'; + return useFfi ? 'NSObject' : 'AnyHashable'; } else if (swiftTypeForDartTypeMap.containsKey(type.baseName)) { - return swiftTypeForDartTypeMap[type.baseName]; + if (useFfi && + !type.isNullable && + (type.baseName == 'int' || + type.baseName == 'double' || + type.baseName == 'bool')) { + return swiftTypeForDartTypeMap[type.baseName]; + } + if (ffiTypedData) { + if (type.baseName == 'Uint8List') { + return '[UInt8]'; + } else if (type.baseName == 'Int32List') { + return '[Int32]'; + } else if (type.baseName == 'Int64List') { + return '[Int64]'; + } else if (type.baseName == 'Float32List') { + return '[Float32]'; + } else if (type.baseName == 'Float64List') { + return '[Float64]'; + } + } + return useFfi + ? _ffiTypeForBuiltinDartType(type) + : swiftTypeForDartTypeMap[type.baseName]; } else if (type.baseName == 'List' || type.baseName == 'Map') { - return _swiftTypeForBuiltinGenericDartType(type); + return _swiftTypeForBuiltinGenericDartType(type, useFfi: useFfi); + } else { + return null; + } +} + +String? _ffiTypeForBuiltinDartType( + TypeDeclaration type, { + bool collectionSubType = false, + bool forceNullable = false, +}) { + final ffiTypeForDartTypeMap = { + 'void': 'Void', + 'bool': 'NSNumber', + 'String': 'NSString', + 'int': 'NSNumber', + 'double': 'NSNumber', + 'Uint8List': '${_classNamePrefix}PigeonTypedData', + 'Int32List': '${_classNamePrefix}PigeonTypedData', + 'Int64List': '${_classNamePrefix}PigeonTypedData', + 'Float32List': '${_classNamePrefix}PigeonTypedData', + 'Float64List': '${_classNamePrefix}PigeonTypedData', + 'Object': 'NSObject', + }; + if (type.baseName == 'Object' && collectionSubType) { + return 'NSObject'; + } else if (ffiTypeForDartTypeMap.containsKey(type.baseName)) { + if (!type.isNullable && + !forceNullable && + !collectionSubType && + (type.baseName == 'int' || + type.baseName == 'double' || + type.baseName == 'bool')) { + return _swiftTypeForDartType(type); + } + return ffiTypeForDartTypeMap[type.baseName]; + } else if (type.baseName == 'List' || type.baseName == 'Map') { + return _ffiTypeForBuiltinGenericDartType(type); + } else if (type.isEnum && (type.isNullable || forceNullable)) { + return 'NSNumber'; } else { return null; } @@ -3072,18 +4206,54 @@ String? _swiftTypeForProxyApiType(TypeDeclaration type) { return null; } -String _swiftTypeForDartType(TypeDeclaration type, {bool mapKey = false}) { - return _swiftTypeForBuiltinDartType(type, mapKey: mapKey) ?? +String _swiftTypeForDartType( + TypeDeclaration type, { + bool mapKey = false, + bool useFfi = false, + bool ffiTypedData = false, +}) { + if (useFfi && type.isEnum && type.isNullable) { + return 'NSNumber'; + } + return _swiftTypeForBuiltinDartType( + type, + mapKey: mapKey, + useFfi: useFfi, + ffiTypedData: ffiTypedData, + ) ?? _swiftTypeForProxyApiType(type) ?? - type.baseName; + (useFfi && type.isClass ? '${type.baseName}Bridge' : type.baseName); +} + +String _ffiTypeForDartType( + TypeDeclaration type, { + bool collectionSubType = false, + bool forceNullable = false, +}) { + return _ffiTypeForBuiltinDartType( + type, + collectionSubType: collectionSubType, + forceNullable: forceNullable, + ) ?? + (type.isClass ? '${type.baseName}Bridge' : type.baseName); } String _nullSafeSwiftTypeForDartType( TypeDeclaration type, { bool mapKey = false, + bool useFfi = false, + bool ffiTypedData = false, }) { final nullSafe = type.isNullable ? '?' : ''; - return '${_swiftTypeForDartType(type, mapKey: mapKey)}$nullSafe'; + return '${_swiftTypeForDartType(type, mapKey: mapKey, useFfi: useFfi, ffiTypedData: ffiTypedData)}$nullSafe'; +} + +String _nullSafeFfiTypeForDartType( + TypeDeclaration type, { + bool collectionSubType = false, + bool forceNullable = false, +}) { + return '${_ffiTypeForDartType(type, collectionSubType: collectionSubType, forceNullable: forceNullable)}${(type.isNullable && type.baseName != 'Object' && !collectionSubType) || forceNullable ? '?' : ''}'; } String _getMethodSignature({ @@ -3092,29 +4262,60 @@ String _getMethodSignature({ required TypeDeclaration returnType, required String errorTypeName, bool isAsynchronous = false, + bool ffiUserApi = false, String? swiftFunction, + bool ffiBridgeApi = false, + _SwiftFunctionComponents? components, String Function(int index, NamedType argument) getParameterName = _getArgumentName, }) { - final components = _SwiftFunctionComponents( + components ??= _SwiftFunctionComponents( name: name, parameters: parameters, returnType: returnType, swiftFunction: swiftFunction, ); - final String returnTypeString = returnType.isVoid + String methodName = components.name; + String returnTypeString = returnType.isVoid ? 'Void' - : _nullSafeSwiftTypeForDartType(returnType); + : _nullSafeSwiftTypeForDartType(returnType, ffiTypedData: ffiUserApi); - final Iterable types = parameters.map( - (NamedType e) => _nullSafeSwiftTypeForDartType(e.type), + Iterable types = parameters.map( + (NamedType e) => + _nullSafeSwiftTypeForDartType(e.type, ffiTypedData: ffiUserApi), ); final Iterable labels = indexMap(components.arguments, ( int index, _SwiftFunctionArgument argument, ) { - return argument.label ?? _getArgumentName(index, argument.namedType); + return argument.label != null && !ffiBridgeApi + ? argument.label! + : _getArgumentName(index, argument.namedType); }); + + final objc = ffiBridgeApi ? '@objc ' : ''; + var throwString = ' throws'; + var errorParam = isAsynchronous && !ffiUserApi + ? '${parameters.isEmpty ? '' : ', '}completion: @escaping (Result<$returnTypeString, $errorTypeName>) -> Void' + : ''; + var asyncString = ''; + + if (ffiBridgeApi) { + methodName = name; + returnTypeString = returnType.isVoid + ? '' + : _nullSafeFfiTypeForDartType(returnType, forceNullable: true); + types = parameters.map( + (NamedType e) => _nullSafeFfiTypeForDartType(e.type), + ); + throwString = ''; + errorParam = + '${parameters.isEmpty ? '' : ', '}wrappedError: $errorTypeName'; + } + asyncString = ffiUserApi || ffiBridgeApi + ? ' async${ffiUserApi ? ' throws' : ''}${returnType.isVoid ? '' : ' -> $returnTypeString'}' + : ''; + final Iterable names = indexMap(parameters, getParameterName); final String parameterSignature = map3(types, labels, names, ( String type, @@ -3125,16 +4326,12 @@ String _getMethodSignature({ }).join(', '); if (isAsynchronous) { - if (parameters.isEmpty) { - return 'func ${components.name}(completion: @escaping (Result<$returnTypeString, $errorTypeName>) -> Void)'; - } else { - return 'func ${components.name}($parameterSignature, completion: @escaping (Result<$returnTypeString, $errorTypeName>) -> Void)'; - } + return '${objc}func $methodName($parameterSignature$errorParam)$asyncString'; } else { if (returnType.isVoid) { - return 'func ${components.name}($parameterSignature) throws'; + return '${objc}func $methodName($parameterSignature$errorParam)$throwString'; } else { - return 'func ${components.name}($parameterSignature) throws -> $returnTypeString'; + return '${objc}func $methodName($parameterSignature$errorParam)$throwString -> $returnTypeString'; } } } diff --git a/packages/pigeon/pigeons/ni_tests.dart b/packages/pigeon/pigeons/ni_tests.dart new file mode 100644 index 000000000000..5cabfbe51a02 --- /dev/null +++ b/packages/pigeon/pigeons/ni_tests.dart @@ -0,0 +1,1924 @@ +// 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. + +// ignore_for_file: always_specify_types, strict_raw_type + +import 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + dartOptions: DartOptions(), + kotlinOptions: KotlinOptions(useJni: true), + swiftOptions: SwiftOptions(useFfi: true, ffiModuleName: 'test_plugin'), + ), +) +enum NIAnEnum { one, two, three, fortyTwo, fourHundredTwentyTwo } + +// Enums require special logic, having multiple ensures that the logic can be +// replicated without collision. +enum NIAnotherEnum { justInCase } + +// This exists to show that unused data classes still generate. +class NIUnusedClass { + NIUnusedClass({this.aField}); + + Object? aField; +} + +/// A class containing all supported types. +class NIAllTypes { + NIAllTypes({ + this.aBool = false, + this.anInt = 0, + this.anInt64 = 0, + this.aDouble = 0, + required this.aByteArray, + required this.a4ByteArray, + required this.a8ByteArray, + required this.aFloatArray, + this.anEnum = NIAnEnum.one, + this.anotherEnum = NIAnotherEnum.justInCase, + this.aString = '', + this.anObject = 0, + + // Lists + // This name is in a different format than the others to ensure that name + // collision with the word 'list' doesn't occur in the generated files. + required this.list, + required this.stringList, + required this.intList, + required this.doubleList, + required this.boolList, + required this.enumList, + required this.objectList, + required this.listList, + required this.mapList, + + // Maps + required this.map, + required this.stringMap, + required this.intMap, + required this.enumMap, + required this.objectMap, + required this.listMap, + required this.mapMap, + }); + + bool aBool; + int anInt; + int anInt64; + double aDouble; + Uint8List aByteArray; + Int32List a4ByteArray; + Int64List a8ByteArray; + Float64List aFloatArray; + NIAnEnum anEnum; + NIAnotherEnum anotherEnum; + String aString; + Object anObject; + + // Lists + List list; + List stringList; + List intList; + List doubleList; + List boolList; + List enumList; + List objectList; + List> listList; + List> mapList; + + // Maps + Map map; + Map stringMap; + Map intMap; + Map enumMap; + Map objectMap; + Map> listMap; + Map> mapMap; +} + +/// A class containing all supported nullable types. +@SwiftClass() +class NIAllNullableTypes { + NIAllNullableTypes( + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + this.allNullableTypes, + + // Lists + // This name is in a different format than the others to ensure that name + // collision with the word 'list' doesn't occur in the generated files. + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + this.recursiveClassList, + + // Maps + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + this.recursiveClassMap, + ); + + bool? aNullableBool; + int? aNullableInt; + int? aNullableInt64; + double? aNullableDouble; + Uint8List? aNullableByteArray; + Int32List? aNullable4ByteArray; + Int64List? aNullable8ByteArray; + Float64List? aNullableFloatArray; + NIAnEnum? aNullableEnum; + NIAnotherEnum? anotherNullableEnum; + String? aNullableString; + Object? aNullableObject; + NIAllNullableTypes? allNullableTypes; + + // Lists + List? list; + List? stringList; + List? intList; + List? doubleList; + List? boolList; + List? enumList; + List? objectList; + List?>? listList; + List?>? mapList; + List? recursiveClassList; + + // Maps + Map? map; + Map? stringMap; + Map? intMap; + Map? enumMap; + Map? objectMap; + Map?>? listMap; + Map?>? mapMap; + Map? recursiveClassMap; +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NIAllNullableTypes] class is being used to +/// test Swift classes. +class NIAllNullableTypesWithoutRecursion { + NIAllNullableTypesWithoutRecursion( + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + + // Lists + // This name is in a different format than the others to ensure that name + // collision with the word 'list' doesn't occur in the generated files. + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + + // // Maps + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + ); + + bool? aNullableBool; + int? aNullableInt; + int? aNullableInt64; + double? aNullableDouble; + Uint8List? aNullableByteArray; + Int32List? aNullable4ByteArray; + Int64List? aNullable8ByteArray; + Float64List? aNullableFloatArray; + NIAnEnum? aNullableEnum; + NIAnotherEnum? anotherNullableEnum; + String? aNullableString; + Object? aNullableObject; + + // Lists + List? list; + List? stringList; + List? intList; + List? doubleList; + List? boolList; + List? enumList; + List? objectList; + List?>? listList; + List?>? mapList; + + // Maps + Map? map; + Map? stringMap; + Map? intMap; + Map? enumMap; + Map? objectMap; + Map?>? listMap; + Map?>? mapMap; +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `NIAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NIAllTypes` when testing doesn't require both (ie. testing null classes). +class NIAllClassesWrapper { + NIAllClassesWrapper( + this.allNullableTypes, + this.allNullableTypesWithoutRecursion, + this.allTypes, + this.classList, + this.nullableClassList, + this.classMap, + this.nullableClassMap, + ); + NIAllNullableTypes allNullableTypes; + NIAllNullableTypesWithoutRecursion? allNullableTypesWithoutRecursion; + NIAllTypes? allTypes; + List classList; + List? nullableClassList; + Map classMap; + Map? nullableClassMap; +} + +/// The core interface that each host language plugin must implement in +/// platform_test integration tests. +@HostApi() +abstract class NIHostIntegrationCoreApi { + // ========== Synchronous method tests ========== + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + void noop(); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllTypes:') + @SwiftFunction('echo(_:)') + NIAllTypes echoAllTypes(NIAllTypes everything); + + /// Returns an error, to test error handling. + Object? throwError(); + + /// Returns an error from a void function, to test error handling. + void throwErrorFromVoid(); + + /// Returns a Flutter error, to test error handling. + Object? throwFlutterError(); + + /// Returns passed in int. + @ObjCSelector('echoInt:') + @SwiftFunction('echo(_:)') + int echoInt(int anInt); + + /// Returns passed in double. + @ObjCSelector('echoDouble:') + @SwiftFunction('echo(_:)') + double echoDouble(double aDouble); + + /// Returns the passed in boolean. + @ObjCSelector('echoBool:') + @SwiftFunction('echo(_:)') + bool echoBool(bool aBool); + + /// Returns the passed in string. + @ObjCSelector('echoString:') + @SwiftFunction('echo(_:)') + String echoString(String aString); + + /// Returns the passed in Uint8List. + @ObjCSelector('echoUint8List:') + @SwiftFunction('echo(_:)') + Uint8List echoUint8List(Uint8List aUint8List); + + /// Returns the passed in Int32List. + @ObjCSelector('echoInt32List:') + @SwiftFunction('echo(_:)') + Int32List echoInt32List(Int32List aInt32List); + + /// Returns the passed in Int64List. + @ObjCSelector('echoInt64List:') + @SwiftFunction('echo(_:)') + Int64List echoInt64List(Int64List aInt64List); + + /// Returns the passed in Float64List. + @ObjCSelector('echoFloat64List:') + @SwiftFunction('echo(_:)') + Float64List echoFloat64List(Float64List aFloat64List); + + /// Returns the passed in generic Object. + @ObjCSelector('echoObject:') + @SwiftFunction('echo(_:)') + Object echoObject(Object anObject); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoList:') + @SwiftFunction('echo(_:)') + List echoList(List list); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoStringList:') + @SwiftFunction('echo(stringList:)') + List echoStringList(List stringList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoIntList:') + @SwiftFunction('echo(intList:)') + List echoIntList(List intList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoDoubleList:') + @SwiftFunction('echo(doubleList:)') + List echoDoubleList(List doubleList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoBoolList:') + @SwiftFunction('echo(boolList:)') + List echoBoolList(List boolList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoEnumList:') + @SwiftFunction('echo(enumList:)') + List echoEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoClassList:') + @SwiftFunction('echo(classList:)') + List echoClassList(List classList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullEnumList:') + @SwiftFunction('echoNonNull(enumList:)') + List echoNonNullEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullClassList:') + @SwiftFunction('echoNonNull(classList:)') + List echoNonNullClassList( + List classList, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoMap:') + @SwiftFunction('echo(_:)') + Map echoMap(Map map); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoStringMap:') + @SwiftFunction('echo(stringMap:)') + Map echoStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoIntMap:') + @SwiftFunction('echo(intMap:)') + Map echoIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoEnumMap:') + @SwiftFunction('echo(enumMap:)') + Map echoEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoClassMap:') + @SwiftFunction('echo(classMap:)') + Map echoClassMap( + Map classMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullStringMap:') + @SwiftFunction('echoNonNull(stringMap:)') + Map echoNonNullStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullIntMap:') + @SwiftFunction('echoNonNull(intMap:)') + Map echoNonNullIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullEnumMap:') + @SwiftFunction('echoNonNull(enumMap:)') + Map echoNonNullEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullClassMap:') + @SwiftFunction('echoNonNull(classMap:)') + Map echoNonNullClassMap( + Map classMap, + ); + + /// Returns the passed class to test nested class serialization and deserialization. + @ObjCSelector('echoClassWrapper:') + @SwiftFunction('echo(_:)') + NIAllClassesWrapper echoClassWrapper(NIAllClassesWrapper wrapper); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoEnum:') + @SwiftFunction('echo(_:)') + NIAnEnum echoEnum(NIAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherEnum:') + @SwiftFunction('echo(_:)') + NIAnotherEnum echoAnotherEnum(NIAnotherEnum anotherEnum); + + /// Returns the default string. + @ObjCSelector('echoNamedDefaultString:') + @SwiftFunction('echoNamedDefault(_:)') + String echoNamedDefaultString({String aString = 'default'}); + + /// Returns passed in double. + @ObjCSelector('echoOptionalDefaultDouble:') + @SwiftFunction('echoOptionalDefault(_:)') + double echoOptionalDefaultDouble([double aDouble = 3.14]); + + /// Returns passed in int. + @ObjCSelector('echoRequiredInt:') + @SwiftFunction('echoRequired(_:)') + int echoRequiredInt({required int anInt}); + + // ========== Synchronous nullable method tests ========== + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllNullableTypes:') + @SwiftFunction('echoNullable(_:)') + NIAllNullableTypes? echoAllNullableTypes(NIAllNullableTypes? everything); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoNullable(_:)') + NIAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @ObjCSelector('extractNestedNullableStringFrom:') + @SwiftFunction('extractNestedNullableString(from:)') + String? extractNestedNullableString(NIAllClassesWrapper wrapper); + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @ObjCSelector('createNestedObjectWithNullableString:') + @SwiftFunction('createNestedObject(with:)') + NIAllClassesWrapper createNestedNullableString(String? nullableString); + + // Returns passed in arguments of multiple types. + @ObjCSelector('sendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypes(aBool:anInt:aString:)') + NIAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + // /// Returns passed in arguments of multiple types. + @ObjCSelector('sendMultipleNullableTypesWithoutRecursionABool:anInt:aString:') + @SwiftFunction( + 'sendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)', + ) + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns passed in int. + @ObjCSelector('echoNullableInt:') + @SwiftFunction('echoNullable(_:)') + int? echoNullableInt(int? aNullableInt); + + /// Returns passed in double. + @ObjCSelector('echoNullableDouble:') + @SwiftFunction('echoNullable(_:)') + double? echoNullableDouble(double? aNullableDouble); + + /// Returns the passed in boolean. + @ObjCSelector('echoNullableBool:') + @SwiftFunction('echoNullable(_:)') + bool? echoNullableBool(bool? aNullableBool); + + /// Returns the passed in string. + @ObjCSelector('echoNullableString:') + @SwiftFunction('echoNullable(_:)') + String? echoNullableString(String? aNullableString); + + /// Returns the passed in Uint8List. + @ObjCSelector('echoNullableUint8List:') + @SwiftFunction('echoNullable(_:)') + Uint8List? echoNullableUint8List(Uint8List? aNullableUint8List); + + /// Returns the passed in Int32List. + @ObjCSelector('echoNullableInt32List:') + @SwiftFunction('echoNullable(_:)') + Int32List? echoNullableInt32List(Int32List? aNullableInt32List); + + /// Returns the passed in Int64List. + @ObjCSelector('echoNullableInt64List:') + @SwiftFunction('echoNullable(_:)') + Int64List? echoNullableInt64List(Int64List? aNullableInt64List); + + /// Returns the passed in Float64List. + @ObjCSelector('echoNullableFloat64List:') + @SwiftFunction('echoNullable(_:)') + Float64List? echoNullableFloat64List(Float64List? aNullableFloat64List); + + /// Returns the passed in generic Object. + @ObjCSelector('echoNullableObject:') + @SwiftFunction('echoNullable(_:)') + Object? echoNullableObject(Object? aNullableObject); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableList:') + @SwiftFunction('echoNullable(_:)') + List? echoNullableList(List? aNullableList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableEnumList:') + @SwiftFunction('echoNullable(enumList:)') + List? echoNullableEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableClassList:') + @SwiftFunction('echoNullable(classList:)') + List? echoNullableClassList( + List? classList, + ); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullEnumList:') + @SwiftFunction('echoNullableNonNull(enumList:)') + List? echoNullableNonNullEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullClassList:') + @SwiftFunction('echoNullableNonNull(classList:)') + List? echoNullableNonNullClassList( + List? classList, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableMap:') + @SwiftFunction('echoNullable(_:)') + Map? echoNullableMap(Map? map); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableStringMap:') + @SwiftFunction('echoNullable(stringMap:)') + Map? echoNullableStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableIntMap:') + @SwiftFunction('echoNullable(intMap:)') + Map? echoNullableIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableEnumMap:') + @SwiftFunction('echoNullable(enumMap:)') + Map? echoNullableEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableClassMap:') + @SwiftFunction('echoNullable(classMap:)') + Map? echoNullableClassMap( + Map? classMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullStringMap:') + @SwiftFunction('echoNullableNonNull(stringMap:)') + Map? echoNullableNonNullStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullIntMap:') + @SwiftFunction('echoNullableNonNull(intMap:)') + Map? echoNullableNonNullIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullEnumMap:') + @SwiftFunction('echoNullableNonNull(enumMap:)') + Map? echoNullableNonNullEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullClassMap:') + @SwiftFunction('echoNullableNonNull(classMap:)') + Map? echoNullableNonNullClassMap( + Map? classMap, + ); + + @ObjCSelector('echoNullableEnum:') + @SwiftFunction('echoNullable(_:)') + NIAnEnum? echoNullableEnum(NIAnEnum? anEnum); + + @ObjCSelector('echoAnotherNullableEnum:') + @SwiftFunction('echoNullable(_:)') + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? anotherEnum); + + /// Returns passed in int. + @ObjCSelector('echoOptionalNullableInt:') + @SwiftFunction('echoOptional(_:)') + int? echoOptionalNullableInt([int? aNullableInt]); + + /// Returns the passed in string. + @ObjCSelector('echoNamedNullableString:') + @SwiftFunction('echoNamed(_:)') + String? echoNamedNullableString({String? aNullableString}); + + // ========== Asynchronous method tests ========== + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + @async + void noopAsync(); + + /// Returns passed in int asynchronously. + @async + @ObjCSelector('echoAsyncInt:') + @SwiftFunction('echoAsync(_:)') + int echoAsyncInt(int anInt); + + /// Returns passed in double asynchronously. + @async + @ObjCSelector('echoAsyncDouble:') + @SwiftFunction('echoAsync(_:)') + double echoAsyncDouble(double aDouble); + + /// Returns the passed in boolean asynchronously. + @async + @ObjCSelector('echoAsyncBool:') + @SwiftFunction('echoAsync(_:)') + bool echoAsyncBool(bool aBool); + + /// Returns the passed string asynchronously. + @async + @ObjCSelector('echoAsyncString:') + @SwiftFunction('echoAsync(_:)') + String echoAsyncString(String aString); + + /// Returns the passed in Uint8List asynchronously. + @async + @ObjCSelector('echoAsyncUint8List:') + @SwiftFunction('echoAsync(_:)') + Uint8List echoAsyncUint8List(Uint8List aUint8List); + + /// Returns the passed in Int32List asynchronously. + @async + @ObjCSelector('echoAsyncInt32List:') + @SwiftFunction('echoAsync(_:)') + Int32List echoAsyncInt32List(Int32List aInt32List); + + /// Returns the passed in Int64List asynchronously. + @async + @ObjCSelector('echoAsyncInt64List:') + @SwiftFunction('echoAsync(_:)') + Int64List echoAsyncInt64List(Int64List aInt64List); + + /// Returns the passed in Float64List asynchronously. + @async + @ObjCSelector('echoAsyncFloat64List:') + @SwiftFunction('echoAsync(_:)') + Float64List echoAsyncFloat64List(Float64List aFloat64List); + + /// Returns the passed in generic Object asynchronously. + @async + @ObjCSelector('echoAsyncObject:') + @SwiftFunction('echoAsync(_:)') + Object echoAsyncObject(Object anObject); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncList:') + @SwiftFunction('echoAsync(_:)') + List echoAsyncList(List list); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncEnumList:') + @SwiftFunction('echoAsync(enumList:)') + List echoAsyncEnumList(List enumList); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncClassList:') + @SwiftFunction('echoAsync(classList:)') + List echoAsyncClassList( + List classList, + ); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncMap:') + @SwiftFunction('echoAsync(_:)') + Map echoAsyncMap(Map map); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncStringMap:') + @SwiftFunction('echoAsync(stringMap:)') + Map echoAsyncStringMap(Map stringMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncIntMap:') + @SwiftFunction('echoAsync(intMap:)') + Map echoAsyncIntMap(Map intMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncEnumMap:') + @SwiftFunction('echoAsync(enumMap:)') + Map echoAsyncEnumMap(Map enumMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncClassMap:') + @SwiftFunction('echoAsync(classMap:)') + Map echoAsyncClassMap( + Map classMap, + ); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncEnum:') + @SwiftFunction('echoAsync(_:)') + NIAnEnum echoAsyncEnum(NIAnEnum anEnum); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAnotherAsyncEnum:') + @SwiftFunction('echoAsync(_:)') + NIAnotherEnum echoAnotherAsyncEnum(NIAnotherEnum anotherEnum); + + /// Responds with an error from an async function returning a value. + @async + Object? throwAsyncError(); + + /// Responds with an error from an async void function. + @async + void throwAsyncErrorFromVoid(); + + /// Responds with a Flutter error from an async function returning a value. + @async + Object? throwAsyncFlutterError(); + + /// Returns the passed object, to test async serialization and deserialization. + @async + @ObjCSelector('echoAsyncNIAllTypes:') + @SwiftFunction('echoAsync(_:)') + NIAllTypes echoAsyncNIAllTypes(NIAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableNIAllNullableTypes:') + @SwiftFunction('echoAsync(_:)') + NIAllNullableTypes? echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ); + + /// Returns the passed object, to test serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableNIAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoAsync(_:)') + NIAllNullableTypesWithoutRecursion? + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns passed in int asynchronously. + @async + @ObjCSelector('echoAsyncNullableInt:') + @SwiftFunction('echoAsyncNullable(_:)') + int? echoAsyncNullableInt(int? anInt); + + /// Returns passed in double asynchronously. + @async + @ObjCSelector('echoAsyncNullableDouble:') + @SwiftFunction('echoAsyncNullable(_:)') + double? echoAsyncNullableDouble(double? aDouble); + + /// Returns the passed in boolean asynchronously. + @async + @ObjCSelector('echoAsyncNullableBool:') + @SwiftFunction('echoAsyncNullable(_:)') + bool? echoAsyncNullableBool(bool? aBool); + + /// Returns the passed string asynchronously. + @async + @ObjCSelector('echoAsyncNullableString:') + @SwiftFunction('echoAsyncNullable(_:)') + String? echoAsyncNullableString(String? aString); + + /// Returns the passed in Uint8List asynchronously. + @async + @ObjCSelector('echoAsyncNullableUint8List:') + @SwiftFunction('echoAsyncNullable(_:)') + Uint8List? echoAsyncNullableUint8List(Uint8List? aUint8List); + + /// Returns the passed in Int32List asynchronously. + @async + @ObjCSelector('echoAsyncNullableInt32List:') + @SwiftFunction('echoAsyncNullable(_:)') + Int32List? echoAsyncNullableInt32List(Int32List? aInt32List); + + /// Returns the passed in Int64List asynchronously. + @async + @ObjCSelector('echoAsyncNullableInt64List:') + @SwiftFunction('echoAsyncNullable(_:)') + Int64List? echoAsyncNullableInt64List(Int64List? aInt64List); + + /// Returns the passed in Float64List asynchronously. + @async + @ObjCSelector('echoAsyncNullableFloat64List:') + @SwiftFunction('echoAsyncNullable(_:)') + Float64List? echoAsyncNullableFloat64List(Float64List? aFloat64List); + + /// Returns the passed in generic Object asynchronously. + @async + @ObjCSelector('echoAsyncNullableObject:') + @SwiftFunction('echoAsyncNullable(_:)') + Object? echoAsyncNullableObject(Object? anObject); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableList:') + @SwiftFunction('echoAsyncNullable(_:)') + List? echoAsyncNullableList(List? list); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableEnumList:') + @SwiftFunction('echoAsyncNullable(enumList:)') + List? echoAsyncNullableEnumList(List? enumList); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableClassList:') + @SwiftFunction('echoAsyncNullable(classList:)') + List? echoAsyncNullableClassList( + List? classList, + ); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableMap:') + @SwiftFunction('echoAsyncNullable(_:)') + Map? echoAsyncNullableMap(Map? map); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableStringMap:') + @SwiftFunction('echoAsyncNullable(stringMap:)') + Map? echoAsyncNullableStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableIntMap:') + @SwiftFunction('echoAsyncNullable(intMap:)') + Map? echoAsyncNullableIntMap(Map? intMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableEnumMap:') + @SwiftFunction('echoAsyncNullable(enumMap:)') + Map? echoAsyncNullableEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableClassMap:') + @SwiftFunction('echoAsyncNullable(classMap:)') + Map? echoAsyncNullableClassMap( + Map? classMap, + ); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableEnum:') + @SwiftFunction('echoAsyncNullable(_:)') + NIAnEnum? echoAsyncNullableEnum(NIAnEnum? anEnum); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAnotherAsyncNullableEnum:') + @SwiftFunction('echoAsyncNullable(_:)') + NIAnotherEnum? echoAnotherAsyncNullableEnum(NIAnotherEnum? anotherEnum); + + void callFlutterNoop(); + + Object? callFlutterThrowError(); + + void callFlutterThrowErrorFromVoid(); + + @ObjCSelector('callFlutterEchoAllTypes:') + @SwiftFunction('callFlutterEcho(_:)') + NIAllTypes callFlutterEchoNIAllTypes(NIAllTypes everything); + + @ObjCSelector('callFlutterEchoAllNullableTypes:') + @SwiftFunction('callFlutterEcho(_:)') + NIAllNullableTypes? callFlutterEchoNIAllNullableTypes( + NIAllNullableTypes? everything, + ); + + @ObjCSelector('callFlutterSendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('callFlutterSendMultipleNullableTypes(aBool:anInt:aString:)') + NIAllNullableTypes callFlutterSendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + @ObjCSelector('callFlutterEchoNIAllNullableTypesWithoutRecursion:') + @SwiftFunction('callFlutterEcho(_:)') + NIAllNullableTypesWithoutRecursion? + callFlutterEchoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + @ObjCSelector( + 'callFlutterSendMultipleNullableTypesWithoutRecursionABool:anInt:aString:', + ) + @SwiftFunction( + 'callFlutterSendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)', + ) + NIAllNullableTypesWithoutRecursion + callFlutterSendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + @ObjCSelector('callFlutterEchoBool:') + @SwiftFunction('callFlutterEcho(_:)') + bool callFlutterEchoBool(bool aBool); + + @ObjCSelector('callFlutterEchoInt:') + @SwiftFunction('callFlutterEcho(_:)') + int callFlutterEchoInt(int anInt); + + @ObjCSelector('callFlutterEchoDouble:') + @SwiftFunction('callFlutterEcho(_:)') + double callFlutterEchoDouble(double aDouble); + + @ObjCSelector('callFlutterEchoString:') + @SwiftFunction('callFlutterEcho(_:)') + String callFlutterEchoString(String aString); + + @ObjCSelector('callFlutterEchoUint8List:') + @SwiftFunction('callFlutterEcho(_:)') + Uint8List callFlutterEchoUint8List(Uint8List list); + + @ObjCSelector('callFlutterEchoInt32List:') + @SwiftFunction('callFlutterEcho(_:)') + Int32List callFlutterEchoInt32List(Int32List list); + + @ObjCSelector('callFlutterEchoInt64List:') + @SwiftFunction('callFlutterEcho(_:)') + Int64List callFlutterEchoInt64List(Int64List list); + + @ObjCSelector('callFlutterEchoFloat64List:') + @SwiftFunction('callFlutterEcho(_:)') + Float64List callFlutterEchoFloat64List(Float64List list); + + @ObjCSelector('callFlutterEchoList:') + @SwiftFunction('callFlutterEcho(_:)') + List callFlutterEchoList(List list); + + @ObjCSelector('callFlutterEchoEnumList:') + @SwiftFunction('callFlutterEcho(enumList:)') + List callFlutterEchoEnumList(List enumList); + + @ObjCSelector('callFlutterEchoClassList:') + @SwiftFunction('callFlutterEcho(classList:)') + List callFlutterEchoClassList( + List classList, + ); + + @ObjCSelector('callFlutterEchoNonNullEnumList:') + @SwiftFunction('callFlutterEchoNonNull(enumList:)') + List callFlutterEchoNonNullEnumList(List enumList); + + @ObjCSelector('callFlutterEchoNonNullClassList:') + @SwiftFunction('callFlutterEchoNonNull(classList:)') + List callFlutterEchoNonNullClassList( + List classList, + ); + + @ObjCSelector('callFlutterEchoMap:') + @SwiftFunction('callFlutterEcho(_:)') + Map callFlutterEchoMap(Map map); + + @ObjCSelector('callFlutterEchoStringMap:') + @SwiftFunction('callFlutterEcho(stringMap:)') + Map callFlutterEchoStringMap( + Map stringMap, + ); + + @ObjCSelector('callFlutterEchoIntMap:') + @SwiftFunction('callFlutterEcho(intMap:)') + Map callFlutterEchoIntMap(Map intMap); + + @ObjCSelector('callFlutterEchoEnumMap:') + @SwiftFunction('callFlutterEcho(enumMap:)') + Map callFlutterEchoEnumMap( + Map enumMap, + ); + + @ObjCSelector('callFlutterEchoClassMap:') + @SwiftFunction('callFlutterEcho(classMap:)') + Map callFlutterEchoClassMap( + Map classMap, + ); + + @ObjCSelector('callFlutterEchoNonNullStringMap:') + @SwiftFunction('callFlutterEchoNonNull(stringMap:)') + Map callFlutterEchoNonNullStringMap( + Map stringMap, + ); + + @ObjCSelector('callFlutterEchoNonNullIntMap:') + @SwiftFunction('callFlutterEchoNonNull(intMap:)') + Map callFlutterEchoNonNullIntMap(Map intMap); + + @ObjCSelector('callFlutterEchoNonNullEnumMap:') + @SwiftFunction('callFlutterEchoNonNull(enumMap:)') + Map callFlutterEchoNonNullEnumMap( + Map enumMap, + ); + + @ObjCSelector('callFlutterEchoNonNullClassMap:') + @SwiftFunction('callFlutterEchoNonNull(classMap:)') + Map callFlutterEchoNonNullClassMap( + Map classMap, + ); + + @ObjCSelector('callFlutterEchoEnum:') + @SwiftFunction('callFlutterEcho(_:)') + NIAnEnum callFlutterEchoEnum(NIAnEnum anEnum); + + @ObjCSelector('callFlutterEchoAnotherEnum:') + @SwiftFunction('callFlutterEcho(_:)') + NIAnotherEnum callFlutterEchoNIAnotherEnum(NIAnotherEnum anotherEnum); + + @ObjCSelector('callFlutterEchoNullableBool:') + @SwiftFunction('callFlutterEchoNullable(_:)') + bool? callFlutterEchoNullableBool(bool? aBool); + + @ObjCSelector('callFlutterEchoNullableInt:') + @SwiftFunction('callFlutterEchoNullable(_:)') + int? callFlutterEchoNullableInt(int? anInt); + + @ObjCSelector('callFlutterEchoNullableDouble:') + @SwiftFunction('callFlutterEchoNullable(_:)') + double? callFlutterEchoNullableDouble(double? aDouble); + + @ObjCSelector('callFlutterEchoNullableString:') + @SwiftFunction('callFlutterEchoNullable(_:)') + String? callFlutterEchoNullableString(String? aString); + + @ObjCSelector('callFlutterEchoNullableUint8List:') + @SwiftFunction('callFlutterEchoNullable(_:)') + Uint8List? callFlutterEchoNullableUint8List(Uint8List? list); + + @ObjCSelector('callFlutterEchoNullableInt32List:') + @SwiftFunction('callFlutterEchoNullable(_:)') + Int32List? callFlutterEchoNullableInt32List(Int32List? list); + + @ObjCSelector('callFlutterEchoNullableInt64List:') + @SwiftFunction('callFlutterEchoNullable(_:)') + Int64List? callFlutterEchoNullableInt64List(Int64List? list); + + @ObjCSelector('callFlutterEchoNullableFloat64List:') + @SwiftFunction('callFlutterEchoNullable(_:)') + Float64List? callFlutterEchoNullableFloat64List(Float64List? list); + + @ObjCSelector('callFlutterEchoNullableList:') + @SwiftFunction('callFlutterEchoNullable(_:)') + List? callFlutterEchoNullableList(List? list); + + @ObjCSelector('callFlutterEchoNullableEnumList:') + @SwiftFunction('callFlutterEchoNullable(enumList:)') + List? callFlutterEchoNullableEnumList(List? enumList); + + @ObjCSelector('callFlutterEchoNullableClassList:') + @SwiftFunction('callFlutterEchoNullable(classList:)') + List? callFlutterEchoNullableClassList( + List? classList, + ); + + @ObjCSelector('callFlutterEchoNullableNonNullEnumList:') + @SwiftFunction('callFlutterEchoNullableNonNull(enumList:)') + List? callFlutterEchoNullableNonNullEnumList( + List? enumList, + ); + + @ObjCSelector('callFlutterEchoNullableNonNullClassList:') + @SwiftFunction('callFlutterEchoNullableNonNull(classList:)') + List? callFlutterEchoNullableNonNullClassList( + List? classList, + ); + + @ObjCSelector('callFlutterEchoNullableMap:') + @SwiftFunction('callFlutterEchoNullable(_:)') + Map? callFlutterEchoNullableMap(Map? map); + + @ObjCSelector('callFlutterEchoNullableStringMap:') + @SwiftFunction('callFlutterEchoNullable(stringMap:)') + Map? callFlutterEchoNullableStringMap( + Map? stringMap, + ); + + @ObjCSelector('callFlutterEchoNullableIntMap:') + @SwiftFunction('callFlutterEchoNullable(intMap:)') + Map? callFlutterEchoNullableIntMap(Map? intMap); + + @ObjCSelector('callFlutterEchoNullableEnumMap:') + @SwiftFunction('callFlutterEchoNullable(enumMap:)') + Map? callFlutterEchoNullableEnumMap( + Map? enumMap, + ); + + @ObjCSelector('callFlutterEchoNullableClassMap:') + @SwiftFunction('callFlutterEchoNullable(classMap:)') + Map? callFlutterEchoNullableClassMap( + Map? classMap, + ); + + @ObjCSelector('callFlutterEchoNullableNonNullStringMap:') + @SwiftFunction('callFlutterEchoNullableNonNull(stringMap:)') + Map? callFlutterEchoNullableNonNullStringMap( + Map? stringMap, + ); + + @ObjCSelector('callFlutterEchoNullableNonNullIntMap:') + @SwiftFunction('callFlutterEchoNullableNonNull(intMap:)') + Map? callFlutterEchoNullableNonNullIntMap(Map? intMap); + + @ObjCSelector('callFlutterEchoNullableNonNullEnumMap:') + @SwiftFunction('callFlutterEchoNullableNonNull(enumMap:)') + Map? callFlutterEchoNullableNonNullEnumMap( + Map? enumMap, + ); + + @ObjCSelector('callFlutterEchoNullableNonNullClassMap:') + @SwiftFunction('callFlutterEchoNullableNonNull(classMap:)') + Map? callFlutterEchoNullableNonNullClassMap( + Map? classMap, + ); + + @ObjCSelector('callFlutterEchoNullableEnum:') + @SwiftFunction('callFlutterEchoNullable(_:)') + NIAnEnum? callFlutterEchoNullableEnum(NIAnEnum? anEnum); + + @ObjCSelector('callFlutterEchoAnotherNullableEnum:') + @SwiftFunction('callFlutterEchoNullable(_:)') + NIAnotherEnum? callFlutterEchoAnotherNullableEnum(NIAnotherEnum? anotherEnum); + + @async + void callFlutterNoopAsync(); + + @async + NIAllTypes callFlutterEchoAsyncNIAllTypes(NIAllTypes everything); + + @async + NIAllNullableTypes? callFlutterEchoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ); + + @async + NIAllNullableTypesWithoutRecursion? + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + @async + bool callFlutterEchoAsyncBool(bool aBool); + + @async + int callFlutterEchoAsyncInt(int anInt); + + @async + double callFlutterEchoAsyncDouble(double aDouble); + + @async + String callFlutterEchoAsyncString(String aString); + + @async + Uint8List callFlutterEchoAsyncUint8List(Uint8List list); + + @async + Int32List callFlutterEchoAsyncInt32List(Int32List list); + + @async + Int64List callFlutterEchoAsyncInt64List(Int64List list); + + @async + Float64List callFlutterEchoAsyncFloat64List(Float64List list); + + @async + Object callFlutterEchoAsyncObject(Object anObject); + + @async + List callFlutterEchoAsyncList(List list); + + @async + List callFlutterEchoAsyncEnumList(List enumList); + + @async + List callFlutterEchoAsyncClassList( + List classList, + ); + + @async + List callFlutterEchoAsyncNonNullEnumList(List enumList); + + @async + List callFlutterEchoAsyncNonNullClassList( + List classList, + ); + + @async + Map callFlutterEchoAsyncMap(Map map); + + @async + Map callFlutterEchoAsyncStringMap( + Map stringMap, + ); + + @async + Map callFlutterEchoAsyncIntMap(Map intMap); + + @async + Map callFlutterEchoAsyncEnumMap( + Map enumMap, + ); + + @async + Map callFlutterEchoAsyncClassMap( + Map classMap, + ); + + @async + NIAnEnum callFlutterEchoAsyncEnum(NIAnEnum anEnum); + + @async + NIAnotherEnum callFlutterEchoAnotherAsyncEnum(NIAnotherEnum anotherEnum); + + @async + bool? callFlutterEchoAsyncNullableBool(bool? aBool); + + @async + int? callFlutterEchoAsyncNullableInt(int? anInt); + + @async + double? callFlutterEchoAsyncNullableDouble(double? aDouble); + + @async + String? callFlutterEchoAsyncNullableString(String? aString); + + @async + Uint8List? callFlutterEchoAsyncNullableUint8List(Uint8List? list); + + @async + Int32List? callFlutterEchoAsyncNullableInt32List(Int32List? list); + + @async + Int64List? callFlutterEchoAsyncNullableInt64List(Int64List? list); + + @async + Float64List? callFlutterEchoAsyncNullableFloat64List(Float64List? list); + + @async + Object? callFlutterThrowFlutterErrorAsync(); + + @async + Object? callFlutterEchoAsyncNullableObject(Object? anObject); + + @async + List? callFlutterEchoAsyncNullableList(List? list); + + @async + List? callFlutterEchoAsyncNullableEnumList( + List? enumList, + ); + + @async + List? callFlutterEchoAsyncNullableClassList( + List? classList, + ); + + @async + List? callFlutterEchoAsyncNullableNonNullEnumList( + List? enumList, + ); + + @async + List? callFlutterEchoAsyncNullableNonNullClassList( + List? classList, + ); + + @async + Map? callFlutterEchoAsyncNullableMap( + Map? map, + ); + + @async + Map? callFlutterEchoAsyncNullableStringMap( + Map? stringMap, + ); + + @async + Map? callFlutterEchoAsyncNullableIntMap(Map? intMap); + + @async + Map? callFlutterEchoAsyncNullableEnumMap( + Map? enumMap, + ); + + @async + Map? callFlutterEchoAsyncNullableClassMap( + Map? classMap, + ); + + @async + NIAnEnum? callFlutterEchoAsyncNullableEnum(NIAnEnum? anEnum); + + @async + NIAnotherEnum? callFlutterEchoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ); + + // ========== Threading tests ========== + + /// Returns true if the handler is run on a main thread. + bool defaultIsMainThread(); + + /// Spawns a background thread and calls `noop` on the [NIFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + @async + bool callFlutterNoopOnBackgroundThread(); +} + +// /// An API that can be implemented for minimal, compile-only tests. +// // +// // This is also here to test that multiple host APIs can be generated +// // successfully in all languages (e.g., in Java where it requires having a +// // wrapper class). +// @HostApi() +// abstract class NIHostTrivialApi { +// void noop(); +// } + +// /// A simple API implemented in some unit tests. +// // +// // This is separate from NIHostIntegrationCoreApi to avoid having to update a +// // lot of unit tests every time we add something to the integration test API. +// // TODO(stuartmorgan): Restructure the unit tests to reduce the number of +// // different APIs we define. +// @HostApi() +// abstract class NIHostSmallApi { +// @async +// @ObjCSelector('echoString:') +// String echo(String aString); + +// @async +// void voidVoid(); +// } + +/// The core interface that the Dart platform_test code implements for host +/// integration tests to call into. +@FlutterApi() +abstract class NIFlutterIntegrationCoreApi { + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + void noop(); + + /// Returns a Flutter error, to test error handling. + Object? throwFlutterError(); + + /// Responds with an error from an async function returning a value. + Object? throwError(); + + /// Responds with an error from an async void function. + void throwErrorFromVoid(); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoNIAllTypes:') + @SwiftFunction('echo(_:)') + NIAllTypes echoNIAllTypes(NIAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoNIAllNullableTypes:') + @SwiftFunction('echoNullable(_:)') + NIAllNullableTypes? echoNIAllNullableTypes(NIAllNullableTypes? everything); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @ObjCSelector('sendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypes(aBool:anInt:aString:)') + NIAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoNIAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoNullable(_:)') + NIAllNullableTypesWithoutRecursion? echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @ObjCSelector('sendMultipleNullableTypesWithoutRecursionABool:anInt:aString:') + @SwiftFunction( + 'sendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)', + ) + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + // // ========== Non-nullable argument/return type tests ========== + + /// Returns the passed boolean, to test serialization and deserialization. + @ObjCSelector('echoBool:') + @SwiftFunction('echo(_:)') + bool echoBool(bool aBool); + + /// Returns the passed int, to test serialization and deserialization. + @ObjCSelector('echoInt:') + @SwiftFunction('echo(_:)') + int echoInt(int anInt); + + /// Returns the passed double, to test serialization and deserialization. + @ObjCSelector('echoDouble:') + @SwiftFunction('echo(_:)') + double echoDouble(double aDouble); + + /// Returns the passed string, to test serialization and deserialization. + @ObjCSelector('echoString:') + @SwiftFunction('echo(_:)') + String echoString(String aString); + + /// Returns the passed byte list, to test serialization and deserialization. + @ObjCSelector('echoUint8List:') + @SwiftFunction('echo(_:)') + Uint8List echoUint8List(Uint8List list); + + /// Returns the passed int32 list, to test serialization and deserialization. + @ObjCSelector('echoInt32List:') + @SwiftFunction('echo(_:)') + Int32List echoInt32List(Int32List list); + + /// Returns the passed int64 list, to test serialization and deserialization. + @ObjCSelector('echoInt64List:') + @SwiftFunction('echo(_:)') + Int64List echoInt64List(Int64List list); + + /// Returns the passed float64 list, to test serialization and deserialization. + @ObjCSelector('echoFloat64List:') + @SwiftFunction('echo(_:)') + Float64List echoFloat64List(Float64List list); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoList:') + @SwiftFunction('echo(_:)') + List echoList(List list); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoEnumList:') + @SwiftFunction('echo(enumList:)') + List echoEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoClassList:') + @SwiftFunction('echo(classList:)') + List echoClassList(List classList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullEnumList:') + @SwiftFunction('echoNonNull(enumList:)') + List echoNonNullEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullClassList:') + @SwiftFunction('echoNonNull(classList:)') + List echoNonNullClassList( + List classList, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoMap:') + @SwiftFunction('echo(_:)') + Map echoMap(Map map); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoStringMap:') + @SwiftFunction('echo(stringMap:)') + Map echoStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoIntMap:') + @SwiftFunction('echo(intMap:)') + Map echoIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoEnumMap:') + @SwiftFunction('echo(enumList:)') + Map echoEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoClassMap:') + @SwiftFunction('echo(classList:)') + Map echoClassMap( + Map classMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullStringMap:') + @SwiftFunction('echoNonNull(stringMap:)') + Map echoNonNullStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullIntMap:') + @SwiftFunction('echoNonNull(intMap:)') + Map echoNonNullIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullEnumMap:') + @SwiftFunction('echoNonNull(enumList:)') + Map echoNonNullEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullClassMap:') + @SwiftFunction('echoNonNull(classList:)') + Map echoNonNullClassMap( + Map classMap, + ); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoEnum:') + @SwiftFunction('echo(_:)') + NIAnEnum echoEnum(NIAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherEnum:') + @SwiftFunction('echo(_:)') + NIAnotherEnum echoNIAnotherEnum(NIAnotherEnum anotherEnum); + + // // ========== Nullable argument/return type tests ========== + + /// Returns the passed boolean, to test serialization and deserialization. + @ObjCSelector('echoNullableBool:') + @SwiftFunction('echoNullable(_:)') + bool? echoNullableBool(bool? aBool); + + /// Returns the passed int, to test serialization and deserialization. + @ObjCSelector('echoNullableInt:') + @SwiftFunction('echoNullable(_:)') + int? echoNullableInt(int? anInt); + + /// Returns the passed double, to test serialization and deserialization. + @ObjCSelector('echoNullableDouble:') + @SwiftFunction('echoNullable(_:)') + double? echoNullableDouble(double? aDouble); + + /// Returns the passed string, to test serialization and deserialization. + @ObjCSelector('echoNullableString:') + @SwiftFunction('echoNullable(_:)') + String? echoNullableString(String? aString); + + /// Returns the passed byte list, to test serialization and deserialization. + @ObjCSelector('echoNullableUint8List:') + @SwiftFunction('echoNullable(_:)') + Uint8List? echoNullableUint8List(Uint8List? list); + + /// Returns the passed int32 list, to test serialization and deserialization. + @ObjCSelector('echoNullableInt32List:') + @SwiftFunction('echoNullable(_:)') + Int32List? echoNullableInt32List(Int32List? list); + + /// Returns the passed int64 list, to test serialization and deserialization. + @ObjCSelector('echoNullableInt64List:') + @SwiftFunction('echoNullable(_:)') + Int64List? echoNullableInt64List(Int64List? list); + + /// Returns the passed float64 list, to test serialization and deserialization. + @ObjCSelector('echoNullableFloat64List:') + @SwiftFunction('echoNullable(_:)') + Float64List? echoNullableFloat64List(Float64List? list); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableList:') + @SwiftFunction('echoNullable(_:)') + List? echoNullableList(List? list); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableEnumList:') + @SwiftFunction('echoNullable(enumList:)') + List? echoNullableEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableClassList:') + @SwiftFunction('echoNullable(classList:)') + List? echoNullableClassList( + List? classList, + ); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullEnumList:') + @SwiftFunction('echoNullableNonNull(enumList:)') + List? echoNullableNonNullEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullClassList:') + @SwiftFunction('echoNullableNonNull(classList:)') + List? echoNullableNonNullClassList( + List? classList, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableMap:') + @SwiftFunction('echoNullable(_:)') + Map? echoNullableMap(Map? map); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableStringMap:') + @SwiftFunction('echoNullable(stringMap:)') + Map? echoNullableStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableIntMap:') + @SwiftFunction('echoNullable(intMap:)') + Map? echoNullableIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableEnumMap:') + @SwiftFunction('echoNullable(enumMap:)') + Map? echoNullableEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableClassMap:') + @SwiftFunction('echoNullable(classMap:)') + Map? echoNullableClassMap( + Map? classMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullStringMap:') + @SwiftFunction('echoNullableNonNull(stringMap:)') + Map? echoNullableNonNullStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullIntMap:') + @SwiftFunction('echoNullableNonNull(intMap:)') + Map? echoNullableNonNullIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullEnumMap:') + @SwiftFunction('echoNullableNonNull(enumMap:)') + Map? echoNullableNonNullEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullClassMap:') + @SwiftFunction('echoNullableNonNull(classMap:)') + Map? echoNullableNonNullClassMap( + Map? classMap, + ); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoNullableEnum:') + @SwiftFunction('echoNullable(_:)') + NIAnEnum? echoNullableEnum(NIAnEnum? anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherNullableEnum:') + @SwiftFunction('echoNullable(_:)') + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? anotherEnum); + + // ========== Async tests ========== + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + @async + void noopAsync(); + + @async + Object? throwFlutterErrorAsync(); + + @async + NIAllTypes echoAsyncNIAllTypes(NIAllTypes everything); + + @async + NIAllNullableTypes? echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ); + + @async + NIAllNullableTypesWithoutRecursion? + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + @async + bool echoAsyncBool(bool aBool); + + @async + int echoAsyncInt(int anInt); + + @async + double echoAsyncDouble(double aDouble); + + @async + String echoAsyncString(String aString); + + @async + Uint8List echoAsyncUint8List(Uint8List list); + + @async + Int32List echoAsyncInt32List(Int32List list); + + @async + Int64List echoAsyncInt64List(Int64List list); + + @async + Float64List echoAsyncFloat64List(Float64List list); + + @async + Object echoAsyncObject(Object anObject); + + @async + List echoAsyncList(List list); + + @async + List echoAsyncEnumList(List enumList); + + @async + List echoAsyncClassList( + List classList, + ); + + @async + List echoAsyncNonNullEnumList(List enumList); + + @async + List echoAsyncNonNullClassList( + List classList, + ); + + @async + Map echoAsyncMap(Map map); + + @async + Map echoAsyncStringMap(Map stringMap); + + @async + Map echoAsyncIntMap(Map intMap); + + @async + Map echoAsyncEnumMap(Map enumMap); + + @async + Map echoAsyncClassMap( + Map classMap, + ); + + @async + NIAnEnum echoAsyncEnum(NIAnEnum anEnum); + + @async + NIAnotherEnum echoAnotherAsyncEnum(NIAnotherEnum anotherEnum); + + @async + bool? echoAsyncNullableBool(bool? aBool); + + @async + int? echoAsyncNullableInt(int? anInt); + + @async + double? echoAsyncNullableDouble(double? aDouble); + + @async + String? echoAsyncNullableString(String? aString); + + @async + Uint8List? echoAsyncNullableUint8List(Uint8List? list); + + @async + Int32List? echoAsyncNullableInt32List(Int32List? list); + + @async + Int64List? echoAsyncNullableInt64List(Int64List? list); + + @async + Float64List? echoAsyncNullableFloat64List(Float64List? list); + + @async + Object? echoAsyncNullableObject(Object? anObject); + + @async + List? echoAsyncNullableList(List? list); + + @async + List? echoAsyncNullableEnumList(List? enumList); + + @async + List? echoAsyncNullableClassList( + List? classList, + ); + + @async + List? echoAsyncNullableNonNullEnumList(List? enumList); + + @async + List? echoAsyncNullableNonNullClassList( + List? classList, + ); + + @async + Map? echoAsyncNullableMap(Map? map); + + @async + Map? echoAsyncNullableStringMap( + Map? stringMap, + ); + + @async + Map? echoAsyncNullableIntMap(Map? intMap); + + @async + Map? echoAsyncNullableEnumMap( + Map? enumMap, + ); + + @async + Map? echoAsyncNullableClassMap( + Map? classMap, + ); + + @async + NIAnEnum? echoAsyncNullableEnum(NIAnEnum? anEnum); + + @async + NIAnotherEnum? echoAnotherAsyncNullableEnum(NIAnotherEnum? anotherEnum); +} diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/pubspec.yaml b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/pubspec.yaml index 32c685284ff0..3ae6e5154559 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/pubspec.yaml +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/pubspec.yaml @@ -21,3 +21,24 @@ dev_dependencies: flutter: uses-material-design: true +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/pubspec.yaml b/packages/pigeon/platform_tests/alternate_language_test_plugin/pubspec.yaml index bf12dbebf173..d3c8553bda3d 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/pubspec.yaml +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/pubspec.yaml @@ -27,3 +27,24 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/comparison_benchmarks.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/comparison_benchmarks.dart new file mode 100644 index 000000000000..32de8d251cb1 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/comparison_benchmarks.dart @@ -0,0 +1,464 @@ +// 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. +// ignore_for_file: avoid_print + +import 'dart:typed_data'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:jni/jni.dart'; + +import 'integration_tests.dart' show FlutterApiTestImplementation; +import 'ni_integration_tests.dart'; +import 'ni_test_types.dart' as ni_types; +import 'src/generated/core_tests.gen.dart' as core; +import 'src/generated/ni_tests.gen.dart' as ni; +import 'test_types.dart' as core_types; + +/// Runs benchmarks comparing MethodChannel to Native Interop. +void runComparisonBenchmarks(TargetGenerator targetGenerator) { + group('Comparison Benchmarks (MethodChannel vs Native Interop)', () { + final mcApi = core.HostIntegrationCoreApi(); + final ni.NIHostIntegrationCoreApiForNativeInterop? niApi = + ni.NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + core.FlutterIntegrationCoreApi.setUp(FlutterApiTestImplementation()); + final niRegistrar = ni.NIFlutterIntegrationCoreApiRegistrar(); + niRegistrar.register(NIFlutterIntegrationCoreApiImpl()); + + testWidgets('Uint8List Echo 1MB Comparison', (WidgetTester _) async { + const int size = 1024 * 1024; + final data = Uint8List(size); + for (var i = 0; i < size; i++) { + data[i] = i % 256; + } + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.echoUint8List(data); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 1MB Uint8List Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + if (niApi != null) { + final niStopwatch = Stopwatch()..start(); + niApi.echoUint8List(data); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 1MB Uint8List Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + } else { + print('NI_BENCHMARK: Native Interop API not available'); + } + }); + + testWidgets('Large Object List 15 Comparison', (WidgetTester _) async { + final coreList = List.generate( + 15, + (_) => core_types.genericAllNullableTypes, + ); + final niList = List.generate( + 15, + (_) => ni_types.recursiveNIAllNullableTypes, + ); + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.echoClassList(coreList); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 15 Objects List Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + if (niApi != null) { + final niStopwatch = Stopwatch()..start(); + niApi.echoClassList(niList); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 15 Objects List Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + } + }); + + testWidgets('Large Int List 200 Comparison', (WidgetTester _) async { + final list = List.generate(200, (i) => i); + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.echoList(list); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Ints List Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + if (niApi != null) { + final niStopwatch = Stopwatch()..start(); + niApi.echoIntList(list); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Ints List Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + } + }); + + testWidgets('Large Int Map 200 Comparison', (WidgetTester _) async { + final map = {for (var i = 0; i < 200; i++) i: i}; + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.echoIntMap(map); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Ints Map Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + if (niApi != null) { + final niStopwatch = Stopwatch()..start(); + niApi.echoIntMap(map); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Ints Map Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + } + }); + + testWidgets('Small String Echo Comparison (x200)', (WidgetTester _) async { + const text = 'Hello Pigeon Benchmark!'; + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + await mcApi.echoString(text); + } + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Strings Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + if (niApi != null) { + final niStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + niApi.echoString(text); + } + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Strings Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + } + }); + + testWidgets('Small Int Echo Comparison (x200)', (WidgetTester _) async { + const value = 42; + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + await mcApi.echoInt(value); + } + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Ints Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + if (niApi != null) { + final niStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + niApi.echoInt(value); + } + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Ints Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + } + }); + + testWidgets('Flutter String Echo Comparison (x200)', ( + WidgetTester _, + ) async { + const text = 'Hello Pigeon Benchmark!'; + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + await mcApi.callFlutterEchoString(text); + } + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Flutter Strings Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + final niStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + niApi!.callFlutterEchoString(text); + } + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Flutter Strings Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + }); + + testWidgets('Flutter Int Echo Comparison (x200)', (WidgetTester _) async { + const value = 42; + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + await mcApi.callFlutterEchoInt(value); + } + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Flutter Ints Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + final niStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + niApi!.callFlutterEchoInt(value); + } + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Flutter Ints Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + }); + + testWidgets('Flutter Uint8List Echo 1MB Comparison', ( + WidgetTester _, + ) async { + const int size = 1024 * 1024; + final data = Uint8List(size); + for (var i = 0; i < size; i++) { + data[i] = i % 256; + } + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.callFlutterEchoUint8List(data); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 1MB Flutter Uint8List Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + final niStopwatch = Stopwatch()..start(); + niApi!.callFlutterEchoUint8List(data); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 1MB Flutter Uint8List Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + }); + + testWidgets('Flutter Large Object List 15 Comparison', ( + WidgetTester _, + ) async { + final coreList = List.generate( + 15, + (_) => core_types.genericAllNullableTypes, + ); + final niList = List.generate( + 15, + (_) => ni_types.recursiveNIAllNullableTypes, + ); + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.callFlutterEchoClassList(coreList); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 15 Flutter Objects List Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + final niStopwatch = Stopwatch()..start(); + niApi!.callFlutterEchoClassList(niList); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 15 Flutter Objects List Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + }); + + testWidgets('Flutter Large Int List 200 Comparison', ( + WidgetTester _, + ) async { + final list = List.generate(200, (i) => i); + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.callFlutterEchoList(list); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Flutter Ints List Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + final niStopwatch = Stopwatch()..start(); + niApi!.callFlutterEchoList(list); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Flutter Ints List Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + }); + + testWidgets('Flutter Large Int Map 200 Comparison', (WidgetTester _) async { + final map = {for (var i = 0; i < 200; i++) i: i}; + + // MethodChannel + final mcStopwatch = Stopwatch()..start(); + await mcApi.callFlutterEchoIntMap(map); + mcStopwatch.stop(); + print( + 'MC_BENCHMARK: 200 Flutter Ints Map Echo took ${mcStopwatch.elapsedMilliseconds}ms', + ); + + // Native Interop + final niStopwatch = Stopwatch()..start(); + niApi!.callFlutterEchoIntMap(map); + niStopwatch.stop(); + print( + 'NI_BENCHMARK: 200 Flutter Ints Map Echo took ${niStopwatch.elapsedMilliseconds}ms', + ); + }); + + if (targetGenerator == TargetGenerator.kotlin) { + testWidgets('JList iteration overhead micro-benchmark: asDart vs raw', ( + WidgetTester _, + ) async { + if (niApi == null) { + return; + } + + // Simulate generating a mock JList + final List dartList = List.generate( + 200, + (i) => 'Item $i'.toJString(), + ); + final JList jList = dartList.toJList(); + + const iters = 100; + + // 1. Without asDart(), uncached size() + final sw1 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + for (var i = 0; i < JList$$Methods(jList).size(); i++) { + final JString? _ = JList$$Methods(jList).get(i); + } + } + sw1.stop(); + print( + 'JLIST_BENCHMARK (without asDart, uncached .size()): ${sw1.elapsedMilliseconds}ms', + ); + + // 2. Without asDart(), cached size() + final sw2 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + final int len = JList$$Methods(jList).size(); + for (var i = 0; i < len; i++) { + final JString? _ = JList$$Methods(jList).get(i); + } + } + sw2.stop(); + print( + 'JLIST_BENCHMARK (without asDart, cached .size()): ${sw2.elapsedMilliseconds}ms', + ); + + // 3. With asDart(), uncached length + final sw3 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + final List asDartList = jList.asDart(); + for (var i = 0; i < asDartList.length; i++) { + final JString _ = asDartList[i]; + } + } + sw3.stop(); + print( + 'JLIST_BENCHMARK (with asDart, uncached .length): ${sw3.elapsedMilliseconds}ms', + ); + + // 4. With asDart(), cached length (current Pigeon code) + final sw4 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + final List asDartList = jList.asDart(); + final int len = asDartList.length; + for (var i = 0; i < len; i++) { + final JString _ = asDartList[i]; + } + } + sw4.stop(); + print( + 'JLIST_BENCHMARK (with asDart, cached .length): ${sw4.elapsedMilliseconds}ms', + ); + + // Check difference + print('JLIST_BENCHMARK differences confirmed via benchmark.'); + }); + } + + if (targetGenerator == TargetGenerator.swift || + targetGenerator == TargetGenerator.objc) { + testWidgets( + 'FFI list casting overhead micro-benchmark: cast() vs List.from() vs map()', + (WidgetTester _) async { + if (niApi == null) { + return; + } + + // Simulate a decoded FFI NSArray which arrives as List via StandardMessageCodec + final ffiList = List.generate(200, (i) => 'Item $i'); + + const iters = 100; + + // 1. .cast() iteration (What Pigeon currently uses for FFI) + final sw1 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + final List castList = ffiList.cast(); + final int len = castList.length; + for (var i = 0; i < len; i++) { + final String _ = castList[i]; + } + } + sw1.stop(); + print( + 'FFI_BENCHMARK (cast() iteration): ${sw1.elapsedMilliseconds}ms', + ); + + // 2. List.from() iteration + final sw2 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + final fromList = List.from(ffiList); + final int len = fromList.length; + for (var i = 0; i < len; i++) { + final String _ = fromList[i]; + } + } + sw2.stop(); + print( + 'FFI_BENCHMARK (List.from() iteration): ${sw2.elapsedMilliseconds}ms', + ); + + // 3. .map().toList() iteration + final sw3 = Stopwatch()..start(); + for (var iter = 0; iter < iters; iter++) { + final List mapList = ffiList + .map((e) => e! as String) + .toList(); + final int len = mapList.length; + for (var i = 0; i < len; i++) { + final String _ = mapList[i]; + } + } + sw3.stop(); + print( + 'FFI_BENCHMARK (.map().toList() iteration): ${sw3.elapsedMilliseconds}ms', + ); + }, + ); + } + }); +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 9ed43123a701..33faad074495 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -12,6 +12,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'generated.dart'; +import 'ni_integration_tests.dart' + as ffi_tests + show TargetGenerator, runPigeonNIIntegrationTests; import 'test_types.dart'; /// Possible host languages that test can target. @@ -45,6 +48,15 @@ const Set proxyApiSupportedLanguages = { void runPigeonIntegrationTests(TargetGenerator targetGenerator) { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + if (targetGenerator == TargetGenerator.kotlin || + targetGenerator == TargetGenerator.swift) { + ffi_tests.runPigeonNIIntegrationTests( + targetGenerator == TargetGenerator.kotlin + ? ffi_tests.TargetGenerator.kotlin + : ffi_tests.TargetGenerator.swift, + ); + } + group('Host sync API tests', () { testWidgets('basic void->void call works', (WidgetTester _) async { final api = HostIntegrationCoreApi(); @@ -381,18 +393,127 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(receivedUint8List, sentUint8List); }); - testWidgets('generic Objects serialize and deserialize correctly', ( + testWidgets( + 'strings as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + const Object sentString = "I'm a computer"; + final Object receivedString = await api.echoObject(sentString); + expect(receivedString, sentString); + }, + ); + + testWidgets( + 'integers as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + const Object sentInt = regularInt; + final Object receivedInt = await api.echoObject(sentInt); + expect(receivedInt, sentInt); + }, + ); + + testWidgets( + 'booleans as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + const Object sentBool = true; + final Object receivedBool = await api.echoObject(sentBool); + expect(receivedBool, sentBool); + }, + ); + + testWidgets( + 'double as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + const Object sentDouble = 2.0694; + final Object receivedDouble = await api.echoObject(sentDouble); + expect(receivedDouble, sentDouble); + }, + ); + + testWidgets( + 'Uint8List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + final Object sentUint8List = Uint8List.fromList([1, 2, 3]); + final Object receivedUint8List = await api.echoObject(sentUint8List); + expect(receivedUint8List, sentUint8List); + }, + ); + + testWidgets( + 'Int32List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + final Object sentInt32List = Int32List.fromList([1, 2, 3]); + final Object receivedInt32List = await api.echoObject(sentInt32List); + expect(receivedInt32List, sentInt32List); + }, + ); + + testWidgets( + 'Int64List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + final Object sentInt64List = Int64List.fromList([1, 2, 3]); + final Object receivedInt64List = await api.echoObject(sentInt64List); + expect(receivedInt64List, sentInt64List); + }, + ); + + testWidgets( + 'class as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + final Object receivedClass = await api.echoObject( + genericAllNullableTypesWithoutRecursion, + ); + expect(receivedClass, genericAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'Float64List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final api = HostIntegrationCoreApi(); + + final Object sentFloat64List = Float64List.fromList([ + 1.0, + 2.0, + 3.0, + ]); + final Object receivedFloat64List = await api.echoObject( + sentFloat64List, + ); + expect(receivedFloat64List, sentFloat64List); + }, + ); + + testWidgets('List as generic Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final api = HostIntegrationCoreApi(); + + final Object receivedList = await api.echoObject(list); + expect(receivedList, list); + }); + + testWidgets('Map as generic Objects serialize and deserialize correctly', ( WidgetTester _, ) async { final api = HostIntegrationCoreApi(); - const Object sentString = "I'm a computer"; - final Object receivedString = await api.echoObject(sentString); - expect(receivedString, sentString); - // Echo a second type as well to ensure the handling is generic. - const Object sentInt = regularInt; - final Object receivedInt = await api.echoObject(sentInt); - expect(receivedInt, sentInt); + final Object receivedMap = await api.echoObject(map); + expect(receivedMap, map); }); testWidgets('lists serialize and deserialize correctly', ( @@ -404,6 +525,43 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(listEquals(echoObject, list), true); }); + // // Currently need set up + // testWidgets('string lists serialize and deserialize correctly', ( + // WidgetTester _, + // ) async { + // final HostIntegrationCoreApi api = HostIntegrationCoreApi(); + + // final List echoObject = await api.echoStringList(stringList); + // expect(listEquals(echoObject, stringList), true); + // }); + + // testWidgets('int lists serialize and deserialize correctly', ( + // WidgetTester _, + // ) async { + // final HostIntegrationCoreApi api = HostIntegrationCoreApi(); + + // final List echoObject = await api.echoIntList(intList); + // expect(listEquals(echoObject, intList), true); + // }); + + // testWidgets('double lists serialize and deserialize correctly', ( + // WidgetTester _, + // ) async { + // final HostIntegrationCoreApi api = HostIntegrationCoreApi(); + + // final List echoObject = await api.echoDoubleList(doubleList); + // expect(listEquals(echoObject, doubleList), true); + // }); + + // testWidgets('bool lists serialize and deserialize correctly', ( + // WidgetTester _, + // ) async { + // final HostIntegrationCoreApi api = HostIntegrationCoreApi(); + + // final List echoObject = await api.echoBoolList(boolList); + // expect(listEquals(echoObject, boolList), true); + // }); + testWidgets('enum lists serialize and deserialize correctly', ( WidgetTester _, ) async { @@ -1846,7 +2004,7 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { // return value in the "Host async API tests" group. group('Flutter API tests', () { setUp(() { - FlutterIntegrationCoreApi.setUp(_FlutterApiTestImplementation()); + FlutterIntegrationCoreApi.setUp(FlutterApiTestImplementation()); }); testWidgets('basic void->void call works', (WidgetTester _) async { @@ -3348,7 +3506,8 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { ); } -class _FlutterApiTestImplementation implements FlutterIntegrationCoreApi { +/// Implementation of FlutterIntegrationCoreApi for integration tests. +class FlutterApiTestImplementation implements FlutterIntegrationCoreApi { @override AllTypes echoAllTypes(AllTypes everything) { return everything; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ni_integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ni_integration_tests.dart new file mode 100644 index 000000000000..1136bf104d1d --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ni_integration_tests.dart @@ -0,0 +1,4058 @@ +// 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. + +// ignore_for_file: unused_local_variable + +import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'comparison_benchmarks.dart'; +import 'ni_test_types.dart'; +import 'src/generated/ni_tests.gen.dart'; + +/// Possible host languages that test can target. +enum TargetGenerator { + /// The Windows C++ generator. + cpp, + + /// The Linux GObject generator. + gobject, + + /// The Android Java generator. + java, + + /// The Android Kotlin generator. + kotlin, + + /// The iOS Objective-C generator. + objc, + + /// The iOS or macOS Swift generator. + swift, +} + +/// Host languages that support generating Proxy APIs. +const Set proxyApiSupportedLanguages = { + TargetGenerator.kotlin, + TargetGenerator.swift, +}; + +/// Sets up and runs the integration tests. +void runPigeonNIIntegrationTests(TargetGenerator targetGenerator) { + group('FFI/JNIHost sync API tests', () { + testWidgets('basic void->void call works', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + try { + api!.noop(); + } catch (e) { + fail(e.toString()); + } + }); + + testWidgets('all datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllTypes echoObject = api!.echoAllTypes(genericNIAllTypes); + expect(echoObject, genericNIAllTypes); + }); + + testWidgets('all nullable datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypes? echoObject = api!.echoAllNullableTypes( + recursiveNIAllNullableTypes, + ); + + expect(echoObject, recursiveNIAllNullableTypes); + }); + + testWidgets('all null datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NIAllNullableTypes(); + + final NIAllNullableTypes? echoNullFilledClass = api!.echoAllNullableTypes( + allTypesNull, + ); + expect(allTypesNull, echoNullFilledClass); + }); + + testWidgets( + 'Classes with list of null serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NIAllNullableTypes(list: ['String', null]); + + final NIAllNullableTypes? echoNullFilledClass = api! + .echoAllNullableTypes(listTypes); + + expect(listTypes, echoNullFilledClass); + }, + ); + + testWidgets( + 'Classes with map of null serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NIAllNullableTypes( + map: {'String': 'string', 'null': null}, + ); + + final NIAllNullableTypes? echoNullFilledClass = api! + .echoAllNullableTypes(listTypes); + + expect(listTypes, echoNullFilledClass); + }, + ); + + testWidgets( + 'all nullable datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypesWithoutRecursion? echoObject = api! + .echoAllNullableTypesWithoutRecursion( + genericNIAllNullableTypesWithoutRecursion, + ); + + expect(echoObject, genericNIAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'all null datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NIAllNullableTypesWithoutRecursion(); + + final NIAllNullableTypesWithoutRecursion? echoNullFilledClass = api! + .echoAllNullableTypesWithoutRecursion(allTypesNull); + expect(allTypesNull, echoNullFilledClass); + }, + ); + + testWidgets( + 'Classes without recursion with list of null serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NIAllNullableTypesWithoutRecursion( + list: ['String', null], + ); + + final NIAllNullableTypesWithoutRecursion? echoNullFilledClass = api! + .echoAllNullableTypesWithoutRecursion(listTypes); + + expect(listTypes, echoNullFilledClass); + }, + ); + + testWidgets( + 'Classes without recursion with map of null serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NIAllNullableTypesWithoutRecursion( + map: {'String': 'string', 'null': null}, + ); + + final NIAllNullableTypesWithoutRecursion? echoNullFilledClass = api! + .echoAllNullableTypesWithoutRecursion(listTypes); + + expect(listTypes, echoNullFilledClass); + }, + ); + + testWidgets('errors are returned correctly', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + api!.throwError(); + }, throwsA(isA())); + }); + + testWidgets('errors are returned from void methods correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + api!.throwErrorFromVoid(); + }, throwsA(isA())); + }); + + testWidgets('flutter errors are returned correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + expect( + () => api!.throwFlutterError(), + throwsA( + (dynamic e) => + e is PlatformException && + e.code == 'code' && + e.message == 'message' && + e.details == 'details', + ), + ); + }); + + testWidgets('nested objects can be sent correctly', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final NIAllClassesWrapper classWrapper = classWrapperMaker(); + final String? receivedString = api!.extractNestedNullableString( + classWrapper, + ); + expect(receivedString, classWrapper.allNullableTypes.aNullableString); + }); + + testWidgets('nested objects can be received correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentString = 'Some string'; + final NIAllClassesWrapper receivedObject = api! + .createNestedNullableString(sentString); + expect(receivedObject.allNullableTypes.aNullableString, sentString); + }); + + testWidgets('nested classes can serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final NIAllClassesWrapper classWrapper = classWrapperMaker(); + final NIAllClassesWrapper receivedClassWrapper = api!.echoClassWrapper( + classWrapper, + ); + + expect(classWrapper, receivedClassWrapper); + }); + + testWidgets('nested null classes can serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final NIAllClassesWrapper classWrapper = classWrapperMaker(); + + classWrapper.allTypes = null; + + final NIAllClassesWrapper receivedClassWrapper = api!.echoClassWrapper( + classWrapper, + ); + expect(classWrapper, receivedClassWrapper); + }); + + testWidgets( + 'Arguments of multiple types serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const aNullableString = 'this is a String'; + const aNullableBool = false; + const int aNullableInt = regularInt; + + final NIAllNullableTypesWithoutRecursion echoObject = api! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableString, + ); + expect(echoObject.aNullableInt, aNullableInt); + expect(echoObject.aNullableBool, aNullableBool); + expect(echoObject.aNullableString, aNullableString); + }, + ); + + testWidgets( + 'Arguments of multiple null types serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypes echoNullFilledClass = api! + .sendMultipleNullableTypes(null, null, null); + expect(echoNullFilledClass.aNullableInt, null); + expect(echoNullFilledClass.aNullableBool, null); + expect(echoNullFilledClass.aNullableString, null); + }, + ); + + testWidgets( + 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const aNullableString = 'this is a String'; + const aNullableBool = false; + const int aNullableInt = regularInt; + + final NIAllNullableTypesWithoutRecursion echoObject = api! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableString, + ); + expect(echoObject.aNullableInt, aNullableInt); + expect(echoObject.aNullableBool, aNullableBool); + expect(echoObject.aNullableString, aNullableString); + }, + ); + + testWidgets( + 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypesWithoutRecursion echoNullFilledClass = api! + .sendMultipleNullableTypesWithoutRecursion(null, null, null); + expect(echoNullFilledClass.aNullableInt, null); + expect(echoNullFilledClass.aNullableBool, null); + expect(echoNullFilledClass.aNullableString, null); + }, + ); + + testWidgets('Int serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const int sentInt = regularInt; + final int receivedInt = api!.echoInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Int64 serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = biggerThanBigInt; + final int receivedInt = api!.echoInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Doubles serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 2.0694; + final double receivedDouble = api!.echoDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('booleans serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + for (final sentBool in [true, false]) { + final bool receivedBool = api!.echoBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('strings serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const sentString = 'default'; + final String receivedString = api!.echoString(sentString); + expect(receivedString, sentString); + }); + + testWidgets('Uint8List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentUint8List = Uint8List.fromList(data); + final Uint8List receivedUint8List = api!.echoUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('Int32List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final sentInt32List = Int32List.fromList([1, 2, 3]); + final Int32List receivedInt32List = api!.echoInt32List(sentInt32List); + expect(receivedInt32List, sentInt32List); + }); + + testWidgets('Int64List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final sentInt64List = Int64List.fromList([1, 2, 3]); + final Int64List receivedInt64List = api!.echoInt64List(sentInt64List); + expect(receivedInt64List, sentInt64List); + }); + + testWidgets('Float64List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final sentFloat64List = Float64List.fromList([1.1, 2.2, 3.3]); + final Float64List receivedFloat64List = api!.echoFloat64List( + sentFloat64List, + ); + expect(receivedFloat64List, sentFloat64List); + }); + + testWidgets( + 'strings as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const Object sentString = "I'm a computer"; + final Object receivedString = api!.echoObject(sentString); + expect(receivedString, sentString); + }, + ); + + testWidgets( + 'integers as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const Object sentInt = regularInt; + final Object receivedInt = api!.echoObject(sentInt); + expect(receivedInt, sentInt); + }, + ); + + testWidgets( + 'booleans as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const Object sentBool = true; + final Object receivedBool = api!.echoObject(sentBool); + expect(receivedBool, sentBool); + }, + ); + + testWidgets( + 'double as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const Object sentDouble = 2.0694; + final Object receivedDouble = api!.echoObject(sentDouble); + expect(receivedDouble, sentDouble); + }, + ); + + testWidgets( + 'Uint8List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object sentUint8List = Uint8List.fromList([1, 2, 3]); + final Object receivedUint8List = api!.echoObject(sentUint8List); + expect(receivedUint8List, sentUint8List); + }, + ); + + testWidgets( + 'Int32List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object sentInt32List = Int32List.fromList([1, 2, 3]); + final Object receivedInt32List = api!.echoObject(sentInt32List); + expect(receivedInt32List, sentInt32List); + }, + ); + + testWidgets( + 'Int64List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object sentInt64List = Int64List.fromList([1, 2, 3]); + final Object receivedInt64List = api!.echoObject(sentInt64List); + expect(receivedInt64List, sentInt64List); + }, + ); + + testWidgets( + 'class as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object receivedClass = api!.echoObject( + genericNIAllNullableTypesWithoutRecursion, + ); + expect(receivedClass, genericNIAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'Float32List as generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object sentFloat32List = Float32List.fromList([ + 1.0, + 2.0, + 3.0, + ]); + final Object receivedFloat32List = api!.echoObject(sentFloat32List); + expect(receivedFloat32List, sentFloat32List); + }, + ); + + testWidgets('List as generic Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object receivedList = api!.echoObject(list); + expect(receivedList, list); + }); + + testWidgets('Map as generic Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object receivedMap = api!.echoObject(map); + expect(receivedMap, map); + }); + + testWidgets('lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('string lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoStringList(stringList); + expect(listEquals(echoObject, stringList), true); + }); + + testWidgets('int lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoIntList(intList); + expect(listEquals(echoObject, intList), true); + }); + + testWidgets('double lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoDoubleList(doubleList); + expect(listEquals(echoObject, doubleList), true); + }); + + testWidgets('bool lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoBoolList(boolList); + expect(listEquals(echoObject, boolList), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoClassList( + allNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('NonNull enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoNonNullEnumList( + nonNullEnumList, + ); + expect(listEquals(echoObject, nonNullEnumList), true); + }); + + testWidgets('NonNull class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoNonNullClassList( + nonNullNIAllNullableTypesList, + ); + for (final (int index, NIAllNullableTypes value) in echoObject.indexed) { + expect(value, nonNullNIAllNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoClassMap( + allNullableTypesMap, + ); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('NonNull string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullStringMap( + nonNullStringMap, + ); + expect(mapEquals(echoObject, nonNullStringMap), true); + }); + + testWidgets('NonNull int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullIntMap(nonNullIntMap); + expect(mapEquals(echoObject, nonNullIntMap), true); + }); + + testWidgets('NonNull enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullEnumMap( + nonNullEnumMap, + ); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }); + + testWidgets('NonNull class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullClassMap( + nonNullNIAllNullableTypesMap, + ); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, nonNullNIAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.two; + final NIAnEnum receivedEnum = api!.echoEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum receivedEnum = api!.echoAnotherEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.fortyTwo; + final NIAnEnum receivedEnum = api!.echoEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('required named parameter', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + // This number corresponds with the default value of this method. + const int sentInt = regularInt; + final int receivedInt = api!.echoRequiredInt(anInt: sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('optional default parameter no arg', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + // This number corresponds with the default value of this method. + const sentDouble = 3.14; + final double receivedDouble = api!.echoOptionalDefaultDouble(); + expect(receivedDouble, sentDouble); + }); + + testWidgets('optional default parameter with arg', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 3.15; + final double receivedDouble = api!.echoOptionalDefaultDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('named default parameter no arg', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + // This string corresponds with the default value of this method. + const sentString = 'default'; + final String receivedString = api!.echoNamedDefaultString(); + expect(receivedString, sentString); + }); + + testWidgets('named default parameter with arg', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + // This string corresponds with the default value of this method. + const sentString = 'notDefault'; + final String receivedString = api!.echoNamedDefaultString( + aString: sentString, + ); + expect(receivedString, sentString); + }); + + testWidgets('Nullable Int serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = api!.echoNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Nullable Int64 serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = biggerThanBigInt; + final int? receivedInt = api!.echoNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null Ints serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final int? receivedNullInt = api!.echoNullableInt(null); + expect(receivedNullInt, null); + }); + + testWidgets('Nullable Doubles serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 2.0694; + final double? receivedDouble = api!.echoNullableDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('Null Doubles serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final double? receivedNullDouble = api!.echoNullableDouble(null); + expect(receivedNullDouble, null); + }); + + testWidgets('Nullable booleans serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + for (final sentBool in [true, false]) { + final bool? receivedBool = api!.echoNullableBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('Null booleans serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const bool? sentBool = null; + final bool? receivedBool = api!.echoNullableBool(sentBool); + expect(receivedBool, sentBool); + }); + + testWidgets('Nullable strings serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const sentString = "I'm a computer"; + final String? receivedString = api!.echoNullableString(sentString); + expect(receivedString, sentString); + }); + + testWidgets('Null strings serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final String? receivedNullString = api!.echoNullableString(null); + expect(receivedNullString, null); + }); + + testWidgets('Nullable Uint8List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentUint8List = Uint8List.fromList(data); + final Uint8List? receivedUint8List = api!.echoNullableUint8List( + sentUint8List, + ); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('Null Uint8List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Uint8List? receivedNullUint8List = api!.echoNullableUint8List(null); + expect(receivedNullUint8List, null); + }); + + testWidgets( + 'generic nullable Objects serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const Object sentString = "I'm a computer"; + final Object? receivedString = api!.echoNullableObject(sentString); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object? receivedInt = api.echoNullableObject(sentInt); + expect(receivedInt, sentInt); + }, + ); + + testWidgets('Null generic Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object? receivedNullObject = api!.echoNullableObject(null); + expect(receivedNullObject, null); + }); + + testWidgets('nullable lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableClassList( + allNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets( + 'nullable NonNull enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableNonNullEnumList( + nonNullEnumList, + ); + expect(listEquals(echoObject, nonNullEnumList), true); + }, + ); + + testWidgets('nullable NonNull lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableClassList( + nonNullNIAllNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, nonNullNIAllNullableTypesList[index]); + } + }); + + testWidgets('nullable maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableStringMap( + stringMap, + ); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableEnumMap( + enumMap, + ); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api! + .echoNullableClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets( + 'nullable NonNull string maps serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api! + .echoNullableNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }, + ); + + testWidgets( + 'nullable NonNull int maps serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableNonNullIntMap( + nonNullIntMap, + ); + expect(mapEquals(echoObject, nonNullIntMap), true); + }, + ); + + testWidgets( + 'nullable NonNull enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api! + .echoNullableNonNullEnumMap(nonNullEnumMap); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }, + ); + + testWidgets( + 'nullable NonNull class maps serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api! + .echoNullableNonNullClassMap(nonNullNIAllNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, nonNullNIAllNullableTypesMap[entry.key]); + } + }, + ); + + testWidgets('nullable enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum? echoEnum = api!.echoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets( + 'multi word nullable enums serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.fourHundredTwentyTwo; + final NIAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }, + ); + + testWidgets('null lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = api!.echoNullableMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = api!.echoNullableStringMap( + null, + ); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = api!.echoNullableIntMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum? sentEnum = null; + final NIAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnotherEnum? sentEnum = null; + final NIAnotherEnum? echoEnum = api!.echoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null classes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypesWithoutRecursion? echoObject = api! + .echoAllNullableTypesWithoutRecursion(null); + + expect(echoObject, isNull); + }); + + testWidgets('null Int32List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int32List? receivedInt32List = api!.echoNullableInt32List(null); + expect(receivedInt32List, isNull); + }); + + testWidgets('null Int64List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int64List? receivedInt64List = api!.echoNullableInt64List(null); + expect(receivedInt64List, isNull); + }); + + testWidgets('null Float64List serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Float64List? receivedFloat64List = api!.echoNullableFloat64List( + null, + ); + expect(receivedFloat64List, isNull); + }); + + testWidgets('optional nullable parameter', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = api!.echoOptionalNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null optional nullable parameter', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final int? receivedNullInt = api!.echoOptionalNullableInt(); + expect(receivedNullInt, null); + }); + + testWidgets('named nullable parameter', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const sentString = "I'm a computer"; + final String? receivedString = api!.echoNamedNullableString( + aNullableString: sentString, + ); + expect(receivedString, sentString); + }); + + testWidgets('Null named nullable parameter', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final String? receivedNullString = api!.echoNamedNullableString(); + expect(receivedNullString, null); + }); + }); + + group('Host async API tests', () { + testWidgets('basic void->void call works', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(api!.noopAsync(), completes); + }); + + testWidgets('async errors are returned from non void methods correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + await api!.throwAsyncError(); + }, throwsA(isA())); + }); + + testWidgets('async errors are returned from void methods correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + await api!.throwAsyncErrorFromVoid(); + }, throwsA(isA())); + }); + + testWidgets( + 'async flutter errors are returned from non void methods correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + expect( + () async { + await api!.throwAsyncFlutterError(); + }, + throwsA( + isA() + .having((PlatformException e) => e.code, 'code', 'code') + .having( + (PlatformException e) => e.message, + 'message', + 'message', + ) + .having( + (PlatformException e) => e.details, + 'details', + 'details', + ), + ), + ); + }, + ); + + testWidgets('all datatypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllTypes echoObject = await api!.echoAsyncNIAllTypes( + genericNIAllTypes, + ); + + expect(echoObject, genericNIAllTypes); + }); + + testWidgets( + 'all nullable async datatypes serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypes? echoObject = await api! + .echoAsyncNullableNIAllNullableTypes(recursiveNIAllNullableTypes); + + expect(echoObject, recursiveNIAllNullableTypes); + }, + ); + + testWidgets( + 'all null datatypes async serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NIAllNullableTypes(); + + final NIAllNullableTypes? echoNullFilledClass = await api! + .echoAsyncNullableNIAllNullableTypes(allTypesNull); + expect(echoNullFilledClass, allTypesNull); + }, + ); + + testWidgets( + 'all nullable async datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NIAllNullableTypesWithoutRecursion? echoObject = await api! + .echoAsyncNullableNIAllNullableTypesWithoutRecursion( + genericNIAllNullableTypesWithoutRecursion, + ); + + expect(echoObject, genericNIAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'all null datatypes without recursion async serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NIAllNullableTypesWithoutRecursion(); + + final NIAllNullableTypesWithoutRecursion? echoNullFilledClass = + await api!.echoAsyncNullableNIAllNullableTypesWithoutRecursion( + allTypesNull, + ); + expect(echoNullFilledClass, allTypesNull); + }, + ); + + testWidgets('Int async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = regularInt; + final int receivedInt = await api!.echoAsyncInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Int64 async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = biggerThanBigInt; + final int receivedInt = await api!.echoAsyncInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Doubles async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 2.0694; + final double receivedDouble = await api!.echoAsyncDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('booleans async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + for (final sentBool in [true, false]) { + final bool receivedBool = await api!.echoAsyncBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('strings async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentObject = 'Hello, asynchronously!'; + + final String echoObject = await api!.echoAsyncString(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('Uint8List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentUint8List = Uint8List.fromList(data); + final Uint8List receivedUint8List = await api!.echoAsyncUint8List( + sentUint8List, + ); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('Int32List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final sentInt32List = Int32List.fromList([1, 2, 3]); + final Int32List receivedInt32List = await api!.echoAsyncInt32List( + sentInt32List, + ); + expect(receivedInt32List, sentInt32List); + }); + + testWidgets('Int64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final sentInt64List = Int64List.fromList([1, 2, 3]); + final Int64List receivedInt64List = await api!.echoAsyncInt64List( + sentInt64List, + ); + expect(receivedInt64List, sentInt64List); + }); + + testWidgets('Float64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final sentFloat64List = Float64List.fromList([1.1, 2.2, 3.3]); + final Float64List receivedFloat64List = await api!.echoAsyncFloat64List( + sentFloat64List, + ); + expect(receivedFloat64List, sentFloat64List); + }); + + testWidgets('generic Objects async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const Object sentString = "I'm a computer"; + final Object receivedString = await api!.echoAsyncObject(sentString); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object receivedInt = await api.echoAsyncObject(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = await api!.echoAsyncList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = await api!.echoAsyncEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = await api! + .echoAsyncClassList(allNullableTypesList); + for (final (int index, NIAllNullableTypes? value) in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncStringMap( + stringMap, + ); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncEnumMap( + enumMap, + ); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api! + .echoAsyncClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum echoEnum = await api!.echoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum echoEnum = await api!.echoAnotherAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.fourHundredTwentyTwo; + final NIAnEnum echoEnum = await api!.echoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable Int async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = await api!.echoAsyncNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('nullable Int64 async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = biggerThanBigInt; + final int? receivedInt = await api!.echoAsyncNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('nullable Doubles async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 2.0694; + final double? receivedDouble = await api!.echoAsyncNullableDouble( + sentDouble, + ); + expect(receivedDouble, sentDouble); + }); + + testWidgets('nullable booleans async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + for (final sentBool in [true, false]) { + final bool? receivedBool = await api!.echoAsyncNullableBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('nullable strings async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentObject = 'Hello, asynchronously!'; + + final String? echoObject = await api!.echoAsyncNullableString(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets( + 'nullable Uint8List async serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentUint8List = Uint8List.fromList(data); + final Uint8List? receivedUint8List = await api! + .echoAsyncNullableUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }, + ); + + testWidgets( + 'nullable generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + const Object sentString = "I'm a computer"; + final Object? receivedString = await api!.echoAsyncNullableObject( + sentString, + ); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object? receivedInt = await api.echoAsyncNullableObject(sentInt); + expect(receivedInt, sentInt); + }, + ); + + testWidgets('nullable lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableEnumList( + enumList, + ); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api! + .echoAsyncNullableClassList(allNullableTypesList); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('nullable maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api!.echoAsyncNullableMap( + map, + ); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api! + .echoAsyncNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api!.echoAsyncNullableIntMap( + intMap, + ); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api! + .echoAsyncNullableEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api! + .echoAsyncNullableClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('nullable enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum? echoEnum = await api!.echoAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum? echoEnum = await api!.echoAnotherAsyncNullableEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum sentEnum = NIAnEnum.fortyTwo; + final NIAnEnum? echoEnum = await api!.echoAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null Ints async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final int? receivedInt = await api!.echoAsyncNullableInt(null); + expect(receivedInt, null); + }); + + testWidgets('null Doubles async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final double? receivedDouble = await api!.echoAsyncNullableDouble(null); + expect(receivedDouble, null); + }); + + testWidgets('null booleans async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final bool? receivedBool = await api!.echoAsyncNullableBool(null); + expect(receivedBool, null); + }); + + testWidgets('null strings async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final String? echoObject = await api!.echoAsyncNullableString(null); + expect(echoObject, null); + }); + + testWidgets('null Uint8List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Uint8List? receivedUint8List = await api! + .echoAsyncNullableUint8List(null); + expect(receivedUint8List, null); + }); + + testWidgets( + 'null generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Object? receivedString = await api!.echoAsyncNullableObject(null); + expect(receivedString, null); + }, + ); + + testWidgets('null lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = await api!.echoAsyncNullableMap( + null, + ); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = await api! + .echoAsyncNullableStringMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = await api!.echoAsyncNullableIntMap( + null, + ); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnEnum? sentEnum = null; + final NIAnEnum? echoEnum = await api!.echoAsyncNullableEnum(null); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NIAnotherEnum? sentEnum = null; + final NIAnotherEnum? echoEnum = await api!.echoAnotherAsyncNullableEnum( + null, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets('null Int32List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int32List? receivedInt32List = await api! + .echoAsyncNullableInt32List(null); + expect(receivedInt32List, isNull); + }); + + testWidgets('null Int64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int64List? receivedInt64List = await api! + .echoAsyncNullableInt64List(null); + expect(receivedInt64List, isNull); + }); + + testWidgets('null Float64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final Float64List? receivedFloat64List = await api! + .echoAsyncNullableFloat64List(null); + expect(receivedFloat64List, isNull); + }); + }); + + // group('Host API with suffix', () { + // testWidgets('echo string succeeds with suffix with multiple instances', + // (_) async { + // final NIHostSmallApiForAndroid? apiWithSuffixOne = + // NIHostSmallApiForAndroid.getInstance(channelName: 'suffixOne'); + // final NIHostSmallApiForAndroid? apiWithSuffixTwo = + // NIHostSmallApiForAndroid.getInstance(channelName: 'suffixTwo'); + // const String sentString = "I'm a computer"; + // final String echoStringOne = await apiWithSuffixOne!.echo(sentString); + // final String echoStringTwo = await apiWithSuffixTwo!.echo(sentString); + // expect(sentString, echoStringOne); + // expect(sentString, echoStringTwo); + // }); + + // testWidgets('multiple instances will have different instance names', + // (_) async { + // // The only way to get the channel name back is to throw an exception. + // // These APIs have no corresponding APIs on the host platforms. + // const String sentString = "I'm a computer"; + // try { + // final NIHostSmallApiForAndroid? apiWithSuffixOne = + // NIHostSmallApiForAndroid.getInstance( + // channelName: 'suffixWithNoHost'); + // await apiWithSuffixOne!.echo(sentString); + // } on ArgumentError catch (e) { + // expect(e.message, contains('suffixWithNoHost')); + // } + // try { + // final NIHostSmallApiForAndroid? apiWithSuffixTwo = + // NIHostSmallApiForAndroid.getInstance( + // channelName: 'suffixWithoutHost'); + // await apiWithSuffixTwo!.echo(sentString); + // } on ArgumentError catch (e) { + // expect(e.message, contains('suffixWithoutHost')); + // } + // }); + // }); + + group('Flutter Api', () { + final registrar = NIFlutterIntegrationCoreApiRegistrar(); + + final NIFlutterIntegrationCoreApi flutterApi = registrar.register( + NIFlutterIntegrationCoreApiImpl(), + ); + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + api!; + + testWidgets('basic void->void call works', (WidgetTester _) async { + api.callFlutterNoop(); + }); + + testWidgets('flutter errors are returned correctly', ( + WidgetTester _, + ) async { + expect( + () async => api.callFlutterThrowFlutterErrorAsync(), + throwsA( + (dynamic e) => + e is PlatformException, // jni doesn't support custom errors yet + ), + ); + }); + + testWidgets('errors are returned from non void methods correctly', ( + WidgetTester _, + ) async { + expect(() async { + api.callFlutterThrowError(); + }, throwsA(isA())); + }); + + testWidgets('errors are returned from void methods correctly', ( + WidgetTester _, + ) async { + expect(() async { + api.callFlutterThrowErrorFromVoid(); + }, throwsA(isA())); + }); + + testWidgets('all datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIAllTypes echoObject = api.callFlutterEchoNIAllTypes( + genericNIAllTypes, + ); + + expect(echoObject, genericNIAllTypes); + }); + + testWidgets('all nullable datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIAllNullableTypes? echoObject = api + .callFlutterEchoNIAllNullableTypes(recursiveNIAllNullableTypes); + + expect(echoObject, recursiveNIAllNullableTypes); + }); + + testWidgets( + 'all nullable datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypesWithoutRecursion? echoObject = api + .callFlutterEchoNIAllNullableTypesWithoutRecursion( + genericNIAllNullableTypesWithoutRecursion, + ); + + expect(echoObject, genericNIAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'Arguments of multiple types serialize and deserialize correctly', + (WidgetTester _) async { + const aNullableString = 'this is a String'; + const aNullableBool = false; + const int aNullableInt = regularInt; + + final NIAllNullableTypes compositeObject = api + .callFlutterSendMultipleNullableTypes( + aNullableBool, + aNullableInt, + aNullableString, + ); + expect(compositeObject.aNullableInt, aNullableInt); + expect(compositeObject.aNullableBool, aNullableBool); + expect(compositeObject.aNullableString, aNullableString); + }, + ); + + testWidgets( + 'Arguments of multiple null types serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypes compositeObject = api + .callFlutterSendMultipleNullableTypes(null, null, null); + expect(compositeObject.aNullableInt, null); + expect(compositeObject.aNullableBool, null); + expect(compositeObject.aNullableString, null); + }, + ); + + testWidgets( + 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', + (WidgetTester _) async { + const aNullableString = 'this is a String'; + const aNullableBool = false; + const int aNullableInt = regularInt; + + final NIAllNullableTypesWithoutRecursion compositeObject = api + .callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableString, + ); + expect(compositeObject.aNullableInt, aNullableInt); + expect(compositeObject.aNullableBool, aNullableBool); + expect(compositeObject.aNullableString, aNullableString); + }, + ); + + testWidgets( + 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', + (WidgetTester _) async { + final NIAllNullableTypesWithoutRecursion compositeObject = api + .callFlutterSendMultipleNullableTypesWithoutRecursion( + null, + null, + null, + ); + expect(compositeObject.aNullableInt, null); + expect(compositeObject.aNullableBool, null); + expect(compositeObject.aNullableString, null); + }, + ); + + testWidgets('booleans serialize and deserialize correctly', ( + WidgetTester _, + ) async { + for (final sentObject in [true, false]) { + final bool echoObject = api.callFlutterEchoBool(sentObject); + expect(echoObject, sentObject); + } + }); + + testWidgets('ints serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const int sentObject = regularInt; + final int echoObject = api.callFlutterEchoInt(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('doubles serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentObject = 2.0694; + final double echoObject = api.callFlutterEchoDouble(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('strings serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentObject = 'Hello Dart!'; + final String echoObject = api.callFlutterEchoString(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('Uint8Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentObject = Uint8List.fromList(data); + final Uint8List echoObject = api.callFlutterEchoUint8List(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('Int32Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Int32List.fromList([1, 2, 3]); + final Int32List echoObject = api.callFlutterEchoInt32List(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('Int64Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Int64List.fromList([1, 2, 3]); + final Int64List echoObject = api.callFlutterEchoInt64List(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('Float64Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Float64List.fromList([1.1, 2.2, 3.3]); + final Float64List echoObject = api.callFlutterEchoFloat64List(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = api.callFlutterEchoList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = api.callFlutterEchoEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = api.callFlutterEchoClassList( + allNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('NonNull enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = api.callFlutterEchoNonNullEnumList( + nonNullEnumList, + ); + expect(listEquals(echoObject, nonNullEnumList), true); + }); + + testWidgets('NonNull class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = api + .callFlutterEchoNonNullClassList(nonNullNIAllNullableTypesList); + for (final (int index, NIAllNullableTypes? value) in echoObject.indexed) { + expect(value, nonNullNIAllNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api.callFlutterEchoMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api.callFlutterEchoStringMap( + stringMap, + ); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api.callFlutterEchoIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api.callFlutterEchoEnumMap( + enumMap, + ); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api + .callFlutterEchoClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('NonNull string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api + .callFlutterEchoNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }); + + testWidgets('NonNull int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api.callFlutterEchoNonNullIntMap( + nonNullIntMap, + ); + expect(mapEquals(echoObject, nonNullIntMap), true); + }); + + testWidgets('NonNull enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api + .callFlutterEchoNonNullEnumMap(nonNullEnumMap); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }); + + testWidgets('NonNull class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = api + .callFlutterEchoNonNullClassMap(nonNullNIAllNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, nonNullNIAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum echoEnum = api.callFlutterEchoEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum echoEnum = api.callFlutterEchoNIAnotherEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnEnum sentEnum = NIAnEnum.fortyTwo; + final NIAnEnum echoEnum = api.callFlutterEchoEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable booleans serialize and deserialize correctly', ( + WidgetTester _, + ) async { + for (final sentObject in [true, false]) { + final bool? echoObject = api.callFlutterEchoNullableBool(sentObject); + expect(echoObject, sentObject); + } + }); + + testWidgets('null booleans serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const bool? sentObject = null; + final bool? echoObject = api.callFlutterEchoNullableBool(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('nullable ints serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const int sentObject = regularInt; + final int? echoObject = api.callFlutterEchoNullableInt(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('nullable big ints serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const int sentObject = biggerThanBigInt; + final int? echoObject = api.callFlutterEchoNullableInt(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('null ints serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final int? echoObject = api.callFlutterEchoNullableInt(null); + expect(echoObject, null); + }); + + testWidgets('nullable doubles serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentObject = 2.0694; + final double? echoObject = api.callFlutterEchoNullableDouble(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('null doubles serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final double? echoObject = api.callFlutterEchoNullableDouble(null); + expect(echoObject, null); + }); + + testWidgets('nullable strings serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentObject = "I'm a computer"; + final String? echoObject = api.callFlutterEchoNullableString(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('null strings serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final String? echoObject = api.callFlutterEchoNullableString(null); + expect(echoObject, null); + }); + + testWidgets('nullable Uint8Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentObject = Uint8List.fromList(data); + final Uint8List? echoObject = api.callFlutterEchoNullableUint8List( + sentObject, + ); + expect(echoObject, sentObject); + }); + + testWidgets('null Uint8Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Uint8List? echoObject = api.callFlutterEchoNullableUint8List(null); + expect(echoObject, null); + }); + + testWidgets('nullable Int32Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Int32List.fromList([1, 2, 3]); + final Int32List? echoObject = api.callFlutterEchoNullableInt32List( + sentObject, + ); + expect(echoObject, sentObject); + }); + + testWidgets('null Int32Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Int32List? echoObject = api.callFlutterEchoNullableInt32List(null); + expect(echoObject, null); + }); + + testWidgets('nullable Int64Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Int64List.fromList([1, 2, 3]); + final Int64List? echoObject = api.callFlutterEchoNullableInt64List( + sentObject, + ); + expect(echoObject, sentObject); + }); + + testWidgets('null Int64Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Int64List? echoObject = api.callFlutterEchoNullableInt64List(null); + expect(echoObject, null); + }); + + testWidgets('nullable Float64Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Float64List.fromList([1.1, 2.2, 3.3]); + final Float64List? echoObject = api.callFlutterEchoNullableFloat64List( + sentObject, + ); + expect(echoObject, sentObject); + }); + + testWidgets('null Float64Lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Float64List? echoObject = api.callFlutterEchoNullableFloat64List( + null, + ); + expect(echoObject, null); + }); + + testWidgets('nullable lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List? echoObject = api.callFlutterEchoNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List? echoObject = api.callFlutterEchoNullableEnumList( + enumList, + ); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable class lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List? echoObject = api + .callFlutterEchoNullableClassList(allNullableTypesList); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets( + 'nullable NonNull enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final List? echoObject = api + .callFlutterEchoNullableNonNullEnumList(nonNullEnumList); + expect(listEquals(echoObject, nonNullEnumList), true); + }, + ); + + testWidgets( + 'nullable NonNull class lists serialize and deserialize correctly', + (WidgetTester _) async { + final List? echoObject = api + .callFlutterEchoNullableNonNullClassList( + nonNullNIAllNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, nonNullNIAllNullableTypesList[index]); + } + }, + ); + + testWidgets('null lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List? echoObject = api.callFlutterEchoNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('nullable maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api.callFlutterEchoNullableMap( + map, + ); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('null maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api.callFlutterEchoNullableMap( + null, + ); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api + .callFlutterEchoNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api.callFlutterEchoNullableIntMap( + intMap, + ); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api + .callFlutterEchoNullableEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api + .callFlutterEchoNullableClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets( + 'nullable NonNull string maps serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = api + .callFlutterEchoNullableNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }, + ); + + testWidgets( + 'nullable NonNull int maps serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = api + .callFlutterEchoNullableNonNullIntMap(nonNullIntMap); + expect(mapEquals(echoObject, nonNullIntMap), true); + }, + ); + + testWidgets( + 'nullable NonNull enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = api + .callFlutterEchoNullableNonNullEnumMap(nonNullEnumMap); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }, + ); + + testWidgets( + 'nullable NonNull class maps serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = api + .callFlutterEchoNullableNonNullClassMap( + nonNullNIAllNullableTypesMap, + ); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, nonNullNIAllNullableTypesMap[entry.key]); + } + }, + ); + + testWidgets('null maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = api.callFlutterEchoNullableIntMap( + null, + ); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('nullable enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum? echoEnum = api.callFlutterEchoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum? echoEnum = api.callFlutterEchoAnotherNullableEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets( + 'multi word nullable enums serialize and deserialize correctly', + (WidgetTester _) async { + const NIAnEnum sentEnum = NIAnEnum.fourHundredTwentyTwo; + final NIAnEnum? echoEnum = api.callFlutterEchoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }, + ); + + testWidgets('null enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnEnum? sentEnum = null; + final NIAnEnum? echoEnum = api.callFlutterEchoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + const NIAnotherEnum? sentEnum = null; + final NIAnotherEnum? echoEnum = api.callFlutterEchoAnotherNullableEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets('async method works', (WidgetTester _) async { + expect(api.callFlutterNoopAsync(), completes); + }); + + testWidgets('echo string', (WidgetTester _) async { + const aString = 'this is a string'; + final String echoString = await api.callFlutterEchoAsyncString(aString); + expect(echoString, aString); + }); + + testWidgets('all datatypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIAllTypes echoObject = await api.callFlutterEchoAsyncNIAllTypes( + genericNIAllTypes, + ); + expect(echoObject, genericNIAllTypes); + }); + + testWidgets( + 'all nullable async datatypes serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypes? echoObject = await api + .callFlutterEchoAsyncNullableNIAllNullableTypes( + recursiveNIAllNullableTypes, + ); + expect(echoObject, recursiveNIAllNullableTypes); + }, + ); + + testWidgets('Int async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const int sentInt = regularInt; + final int receivedInt = await api.callFlutterEchoAsyncInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Doubles async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentDouble = 2.0694; + final double receivedDouble = await api.callFlutterEchoAsyncDouble( + sentDouble, + ); + expect(receivedDouble, sentDouble); + }); + + testWidgets('booleans async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + for (final sentBool in [true, false]) { + final bool receivedBool = await api.callFlutterEchoAsyncBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('Uint8List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentUint8List = Uint8List.fromList(data); + final Uint8List receivedUint8List = await api + .callFlutterEchoAsyncUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('Int32List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Int32List.fromList([1, 2, 3]); + final Int32List receivedObject = await api.callFlutterEchoAsyncInt32List( + sentObject, + ); + expect(receivedObject, sentObject); + }); + + testWidgets('Int64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Int64List.fromList([1, 2, 3]); + final Int64List receivedObject = await api.callFlutterEchoAsyncInt64List( + sentObject, + ); + expect(receivedObject, sentObject); + }); + + testWidgets('Float64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final sentObject = Float64List.fromList([1.1, 2.2, 3.3]); + final Float64List receivedObject = await api + .callFlutterEchoAsyncFloat64List(sentObject); + expect(receivedObject, sentObject); + }); + + testWidgets( + 'Float64List async nullable serialize and deserialize correctly', + (WidgetTester _) async { + final sentObject = Float64List.fromList([1.1, 2.2, 3.3]); + final Float64List? receivedObject = await api + .callFlutterEchoAsyncNullableFloat64List(sentObject); + expect(receivedObject, sentObject); + }, + ); + + testWidgets('Float64List async null serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Float64List? receivedObject = await api + .callFlutterEchoAsyncNullableFloat64List(null); + expect(receivedObject, null); + }); + + testWidgets('generic Objects async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const Object sentString = "I'm a computer"; + final Object receivedString = await api.callFlutterEchoAsyncObject( + sentString, + ); + expect(receivedString, sentString); + }); + + testWidgets('lists async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = await api.callFlutterEchoAsyncList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('enum lists async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = await api.callFlutterEchoAsyncEnumList( + enumList, + ); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List echoObject = await api + .callFlutterEchoAsyncClassList(allNullableTypesList); + for (final (int index, NIAllNullableTypes? value) in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets( + 'NonNull enum lists async serialize and deserialize correctly', + (WidgetTester _) async { + final List echoObject = await api + .callFlutterEchoAsyncNonNullEnumList(nonNullEnumList); + expect(listEquals(echoObject, nonNullEnumList), true); + }, + ); + + testWidgets( + 'NonNull class lists async serialize and deserialize correctly', + (WidgetTester _) async { + final List echoObject = await api + .callFlutterEchoAsyncNonNullClassList( + nonNullNIAllNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) + in echoObject.indexed) { + expect(value, nonNullNIAllNullableTypesList[index]); + } + }, + ); + + testWidgets('maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = await api + .callFlutterEchoAsyncMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = await api + .callFlutterEchoAsyncStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = await api.callFlutterEchoAsyncIntMap( + intMap, + ); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = await api + .callFlutterEchoAsyncEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map echoObject = await api + .callFlutterEchoAsyncClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum echoEnum = await api.callFlutterEchoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable Int async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const int sentInt = regularInt; + final int? receivedInt = await api.callFlutterEchoAsyncNullableInt( + sentInt, + ); + expect(receivedInt, sentInt); + }); + + testWidgets('nullable Doubles async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentDouble = 2.0694; + final double? receivedDouble = await api + .callFlutterEchoAsyncNullableDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('nullable booleans async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + for (final sentBool in [true, false]) { + final bool? receivedBool = await api.callFlutterEchoAsyncNullableBool( + sentBool, + ); + expect(receivedBool, sentBool); + } + }); + + testWidgets('nullable strings async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const sentObject = 'Hello, asynchronously!'; + final String? echoObject = await api.callFlutterEchoAsyncNullableString( + sentObject, + ); + expect(echoObject, sentObject); + }); + + testWidgets( + 'nullable Uint8List async serialize and deserialize correctly', + (WidgetTester _) async { + final data = [102, 111, 114, 116, 121, 45, 116, 119, 111, 0]; + final sentUint8List = Uint8List.fromList(data); + final Uint8List? receivedUint8List = await api + .callFlutterEchoAsyncNullableUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }, + ); + + testWidgets( + 'nullable generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + const Object sentString = "I'm a computer"; + final Object? receivedString = await api + .callFlutterEchoAsyncNullableObject(sentString); + expect(receivedString, sentString); + }, + ); + + testWidgets('nullable lists async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List? echoObject = await api + .callFlutterEchoAsyncNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets( + 'nullable enum lists async serialize and deserialize correctly', + (WidgetTester _) async { + final List? echoObject = await api + .callFlutterEchoAsyncNullableEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }, + ); + + testWidgets( + 'nullable class lists async serialize and deserialize correctly', + (WidgetTester _) async { + final List? echoObject = await api + .callFlutterEchoAsyncNullableClassList(allNullableTypesList); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }, + ); + + testWidgets('nullable maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets( + 'nullable string maps async serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }, + ); + + testWidgets('nullable int maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets( + 'nullable enum maps async serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }, + ); + + testWidgets( + 'nullable class maps async serialize and deserialize correctly', + (WidgetTester _) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }, + ); + + testWidgets('nullable enums async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnEnum sentEnum = NIAnEnum.three; + final NIAnEnum? echoEnum = await api.callFlutterEchoAsyncNullableEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets('null Ints async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final int? receivedInt = await api.callFlutterEchoAsyncNullableInt(null); + expect(receivedInt, null); + }); + + testWidgets('null Doubles async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final double? receivedDouble = await api + .callFlutterEchoAsyncNullableDouble(null); + expect(receivedDouble, null); + }); + + testWidgets('null booleans async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final bool? receivedBool = await api.callFlutterEchoAsyncNullableBool( + null, + ); + expect(receivedBool, null); + }); + + testWidgets('null strings async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final String? echoObject = await api.callFlutterEchoAsyncNullableString( + null, + ); + expect(echoObject, null); + }); + + testWidgets('null Uint8List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Uint8List? receivedUint8List = await api + .callFlutterEchoAsyncNullableUint8List(null); + expect(receivedUint8List, null); + }); + + testWidgets( + 'nullable Int32List async serialize and deserialize correctly', + (WidgetTester _) async { + final sentObject = Int32List.fromList([1, 2, 3]); + final Int32List? receivedObject = await api + .callFlutterEchoAsyncNullableInt32List(sentObject); + expect(receivedObject, sentObject); + }, + ); + + testWidgets('null Int32List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Int32List? receivedObject = await api + .callFlutterEchoAsyncNullableInt32List(null); + expect(receivedObject, null); + }); + + testWidgets( + 'nullable Int64List async serialize and deserialize correctly', + (WidgetTester _) async { + final sentObject = Int64List.fromList([1, 2, 3]); + final Int64List? receivedObject = await api + .callFlutterEchoAsyncNullableInt64List(sentObject); + expect(receivedObject, sentObject); + }, + ); + + testWidgets('null Int64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Int64List? receivedObject = await api + .callFlutterEchoAsyncNullableInt64List(null); + expect(receivedObject, null); + }); + + testWidgets( + 'null generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + final Object? receivedString = await api + .callFlutterEchoAsyncNullableObject(null); + expect(receivedString, null); + }, + ); + + testWidgets('null lists async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final List? echoObject = await api + .callFlutterEchoAsyncNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableStringMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final Map? echoObject = await api + .callFlutterEchoAsyncNullableIntMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets( + 'nullable NonNull enum lists async serialize and deserialize correctly', + (WidgetTester _) async { + final List? echoObject = await api + .callFlutterEchoAsyncNullableNonNullEnumList(nonNullEnumList); + expect(listEquals(echoObject, nonNullEnumList), true); + }, + ); + + testWidgets( + 'nullable NonNull class lists async serialize and deserialize correctly', + (WidgetTester _) async { + final List? echoObject = await api + .callFlutterEchoAsyncNullableNonNullClassList( + nonNullNIAllNullableTypesList, + ); + for (final (int index, NIAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, nonNullNIAllNullableTypesList[index]); + } + }, + ); + + testWidgets('null enums async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIAnEnum? echoEnum = await api.callFlutterEchoAsyncNullableEnum( + null, + ); + expect(echoEnum, null); + }); + + testWidgets('another enum async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum echoEnum = await api.callFlutterEchoAnotherAsyncEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets( + 'another nullable enum async serialize and deserialize correctly', + (WidgetTester _) async { + const NIAnotherEnum sentEnum = NIAnotherEnum.justInCase; + final NIAnotherEnum? echoEnum = await api + .callFlutterEchoAnotherAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }, + ); + + testWidgets('another null enum async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIAnotherEnum? echoEnum = await api + .callFlutterEchoAnotherAsyncNullableEnum(null); + expect(echoEnum, null); + }); + + testWidgets('NIAllTypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NIAllTypes echoObject = await api.callFlutterEchoAsyncNIAllTypes( + genericNIAllTypes, + ); + expect(echoObject, genericNIAllTypes); + }); + + testWidgets( + 'NIAllNullableTypes async serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypes? echoObject = await api + .callFlutterEchoAsyncNullableNIAllNullableTypes( + genericNIAllNullableTypes, + ); + expect(echoObject, genericNIAllNullableTypes); + }, + ); + + testWidgets( + 'null NIAllNullableTypes async serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypes? echoObject = await api + .callFlutterEchoAsyncNullableNIAllNullableTypes(null); + expect(echoObject, null); + }, + ); + + testWidgets( + 'NIAllNullableTypesWithoutRecursion async serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypesWithoutRecursion? echoObject = await api + .callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + genericNIAllNullableTypesWithoutRecursion, + ); + expect(echoObject, genericNIAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'null NIAllNullableTypesWithoutRecursion async serialize and deserialize correctly', + (WidgetTester _) async { + final NIAllNullableTypesWithoutRecursion? echoObject = await api + .callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + null, + ); + expect(echoObject, null); + }, + ); + }); + group('Threading tests', () { + testWidgets('default calls land on main thread', (WidgetTester _) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final bool isMainThread = api!.defaultIsMainThread(); + expect(isMainThread, true); + }); + + testWidgets('calls back to flutter can be made on background thread', ( + WidgetTester _, + ) async { + final NIHostIntegrationCoreApiForNativeInterop? api = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + final bool success = await api!.callFlutterNoopOnBackgroundThread(); + expect(success, true); + }); + }); + + runComparisonBenchmarks(targetGenerator); +} + +/// Implementation of the Flutter API for Native Interop. +class NIFlutterIntegrationCoreApiImpl extends NIFlutterIntegrationCoreApi { + @override + String echoString(String value) { + return value; + } + + @override + void noop() { + return; + } + + @override + Object? throwFlutterError() { + throw PlatformException( + code: 'code', + message: 'message', + details: 'details', + ); + } + + @override + int echoInt(int anInt) { + return anInt; + } + + @override + bool echoBool(bool aBool) { + return aBool; + } + + @override + Int32List echoInt32List(Int32List list) { + return list; + } + + @override + Int64List echoInt64List(Int64List list) { + return list; + } + + @override + Float64List echoFloat64List(Float64List list) { + return list; + } + + @override + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? anotherEnum) { + return anotherEnum; + } + + @override + Future echoAsyncString(String aString) async { + return aString; + } + + @override + Future echoAsyncBool(bool aBool) async { + return aBool; + } + + @override + Future echoAsyncInt(int anInt) async { + return anInt; + } + + @override + Future echoAsyncDouble(double aDouble) async { + return aDouble; + } + + @override + Future echoAsyncNIAllTypes(NIAllTypes everything) async { + return everything; + } + + @override + Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + return everything; + } + + @override + Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + return everything; + } + + @override + Future echoAsyncUint8List(Uint8List list) async { + return list; + } + + @override + Future echoAsyncInt32List(Int32List list) async { + return list; + } + + @override + Future echoAsyncInt64List(Int64List list) async { + return list; + } + + @override + Future echoAsyncFloat64List(Float64List list) async { + return list; + } + + @override + Future echoAsyncObject(Object anObject) async { + return anObject; + } + + @override + Future> echoAsyncList(List list) async { + return list; + } + + @override + Future> echoAsyncEnumList(List enumList) async { + return enumList; + } + + @override + Future> echoAsyncClassList( + List classList, + ) async { + return classList; + } + + @override + Future> echoAsyncNonNullEnumList( + List enumList, + ) async { + return enumList; + } + + @override + Future> echoAsyncNonNullClassList( + List classList, + ) async { + return classList; + } + + @override + Future> echoAsyncMap(Map map) async { + return map; + } + + @override + Future> echoAsyncStringMap( + Map stringMap, + ) async { + return stringMap; + } + + @override + Future> echoAsyncIntMap(Map intMap) async { + return intMap; + } + + @override + Future> echoAsyncEnumMap( + Map enumMap, + ) async { + return enumMap; + } + + @override + Future> echoAsyncClassMap( + Map classMap, + ) async { + return classMap; + } + + @override + Future echoAsyncEnum(NIAnEnum anEnum) async { + return anEnum; + } + + @override + Future echoAnotherAsyncEnum(NIAnotherEnum anotherEnum) async { + return anotherEnum; + } + + @override + Future echoAsyncNullableBool(bool? aBool) async { + return aBool; + } + + @override + Future echoAsyncNullableInt(int? anInt) async { + return anInt; + } + + @override + Future echoAsyncNullableDouble(double? aDouble) async { + return aDouble; + } + + @override + Future echoAsyncNullableString(String? aString) async { + return aString; + } + + @override + Future echoAsyncNullableUint8List(Uint8List? list) async { + return list; + } + + @override + Future echoAsyncNullableInt32List(Int32List? list) async { + return list; + } + + @override + Future echoAsyncNullableInt64List(Int64List? list) async { + return list; + } + + @override + Future echoAsyncNullableFloat64List(Float64List? list) async { + return list; + } + + @override + Future echoAsyncNullableObject(Object? anObject) async { + return anObject; + } + + @override + Future?> echoAsyncNullableList(List? list) async { + return list; + } + + @override + Future?> echoAsyncNullableEnumList( + List? enumList, + ) async { + return enumList; + } + + @override + Future?> echoAsyncNullableClassList( + List? classList, + ) async { + return classList; + } + + @override + Future?> echoAsyncNullableNonNullEnumList( + List? enumList, + ) async { + return enumList; + } + + @override + Future?> echoAsyncNullableNonNullClassList( + List? classList, + ) async { + return classList; + } + + @override + Future?> echoAsyncNullableMap( + Map? map, + ) async { + return map; + } + + @override + Future?> echoAsyncNullableStringMap( + Map? stringMap, + ) async { + return stringMap; + } + + @override + Future?> echoAsyncNullableIntMap( + Map? intMap, + ) async { + return intMap; + } + + @override + Future?> echoAsyncNullableEnumMap( + Map? enumMap, + ) async { + return enumMap; + } + + @override + Future?> echoAsyncNullableClassMap( + Map? classMap, + ) async { + return classMap; + } + + @override + Future echoAsyncNullableEnum(NIAnEnum? anEnum) async { + return anEnum; + } + + @override + Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + return anotherEnum; + } + + @override + List echoClassList(List classList) { + return classList; + } + + @override + Map echoClassMap( + Map classMap, + ) { + return classMap; + } + + @override + double echoDouble(double aDouble) { + return aDouble; + } + + @override + NIAnEnum echoEnum(NIAnEnum anEnum) { + return anEnum; + } + + @override + List echoEnumList(List enumList) { + return enumList; + } + + @override + Map echoEnumMap(Map enumMap) { + return enumMap; + } + + @override + Map echoIntMap(Map intMap) { + return intMap; + } + + @override + NIAllNullableTypes? echoNIAllNullableTypes(NIAllNullableTypes? everything) { + return everything; + } + + @override + NIAllNullableTypesWithoutRecursion? echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) { + return everything; + } + + @override + NIAllTypes echoNIAllTypes(NIAllTypes everything) { + return everything; + } + + @override + NIAnotherEnum echoNIAnotherEnum(NIAnotherEnum anotherEnum) { + return anotherEnum; + } + + @override + List echoList(List list) { + return list; + } + + @override + Map echoMap(Map map) { + return map; + } + + @override + List echoNonNullClassList( + List classList, + ) { + return classList; + } + + @override + Map echoNonNullClassMap( + Map classMap, + ) { + return classMap; + } + + @override + List echoNonNullEnumList(List enumList) { + return enumList; + } + + @override + Map echoNonNullEnumMap(Map enumMap) { + return enumMap; + } + + @override + Map echoNonNullIntMap(Map intMap) { + return intMap; + } + + @override + Map echoNonNullStringMap(Map stringMap) { + return stringMap; + } + + @override + bool? echoNullableBool(bool? aBool) { + return aBool; + } + + @override + List? echoNullableClassList( + List? classList, + ) { + return classList; + } + + @override + Map? echoNullableClassMap( + Map? classMap, + ) { + return classMap; + } + + @override + double? echoNullableDouble(double? aDouble) { + return aDouble; + } + + @override + NIAnEnum? echoNullableEnum(NIAnEnum? anEnum) { + return anEnum; + } + + @override + List? echoNullableEnumList(List? enumList) { + return enumList; + } + + @override + Map? echoNullableEnumMap( + Map? enumMap, + ) { + return enumMap; + } + + @override + int? echoNullableInt(int? anInt) { + return anInt; + } + + @override + Map? echoNullableIntMap(Map? intMap) { + return intMap; + } + + @override + List? echoNullableList(List? list) { + return list; + } + + @override + Map? echoNullableMap(Map? map) { + return map; + } + + @override + List? echoNullableNonNullClassList( + List? classList, + ) { + return classList; + } + + @override + Map? echoNullableNonNullClassMap( + Map? classMap, + ) { + return classMap; + } + + @override + Int32List? echoNullableInt32List(Int32List? list) { + return list; + } + + @override + Int64List? echoNullableInt64List(Int64List? list) { + return list; + } + + @override + Float64List? echoNullableFloat64List(Float64List? list) { + return list; + } + + @override + List? echoNullableNonNullEnumList(List? enumList) { + return enumList; + } + + @override + Map? echoNullableNonNullEnumMap( + Map? enumMap, + ) { + return enumMap; + } + + @override + Map? echoNullableNonNullIntMap(Map? intMap) { + return intMap; + } + + @override + Map? echoNullableNonNullStringMap( + Map? stringMap, + ) { + return stringMap; + } + + @override + String? echoNullableString(String? aString) { + return aString; + } + + @override + Map? echoNullableStringMap( + Map? stringMap, + ) { + return stringMap; + } + + @override + Uint8List? echoNullableUint8List(Uint8List? list) { + return list; + } + + @override + Map echoStringMap(Map stringMap) { + return stringMap; + } + + @override + Uint8List echoUint8List(Uint8List list) { + return list; + } + + @override + Future noopAsync() async { + return; + } + + @override + NIAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + return NIAllNullableTypes( + aNullableBool: aNullableBool, + aNullableInt: aNullableInt, + aNullableString: aNullableString, + ); + } + + @override + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + return NIAllNullableTypesWithoutRecursion( + aNullableBool: aNullableBool, + aNullableInt: aNullableInt, + aNullableString: aNullableString, + ); + } + + @override + Object? throwError() { + throw PlatformException( + code: 'code', + message: 'message', + details: 'details', + ); + } + + @override + Future throwFlutterErrorAsync() { + throw PlatformException( + code: 'code', + message: 'message', + details: 'details', + ); + } + + @override + void throwErrorFromVoid() { + throw PlatformException( + code: 'code', + message: 'message', + details: 'details', + ); + } + + // @override + // Object? throwError() { + // throw FlutterError('this is an error'); + // } + + // @override + // void throwErrorFromVoid() { + // throw FlutterError('this is an error'); + // } +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ni_test_types.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ni_test_types.dart new file mode 100644 index 000000000000..b354b3504208 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ni_test_types.dart @@ -0,0 +1,405 @@ +// 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. + +// ignore_for_file: public_member_api_docs + +import 'package:flutter/foundation.dart'; + +import 'src/generated/ni_tests.gen.dart'; + +const int biggerThanBigInt = 3000000000; +const int regularInt = 42; +const double doublePi = 3.14159; + +final List nonNullList = ['Thing 1', 2, true, 3.14]; + +final List nonNullStringList = ['Thing 1', '2', 'true', '3.14']; + +final List nonNullIntList = [1, 2, 3, 4]; + +final List nonNullDoubleList = [1, 2.99999, 3, 3.14]; + +final List nonNullBoolList = [true, false, true, false]; + +final List nonNullEnumList = [ + NIAnEnum.one, + NIAnEnum.two, + NIAnEnum.three, + NIAnEnum.fortyTwo, + NIAnEnum.fourHundredTwentyTwo, +]; + +final List> nonNullListList = >[ + nonNullList, + nonNullStringList, + nonNullIntList, + nonNullDoubleList, + nonNullBoolList, + nonNullEnumList, +]; + +final Map nonNullMap = { + 'a': 1, + 'b': 2.0, + 'c': 'three', + 'd': false, +}; + +final Map nonNullStringMap = { + 'a': '1', + 'b': '2.0', + 'c': 'three', + 'd': 'false', +}; + +final Map nonNullIntMap = {0: 0, 1: 1, 2: 3, 4: -1}; + +final Map nonNullDoubleMap = { + 0.0: 0, + 1.1: 2.0, + 3: 0.3, + -.4: -0.2, +}; + +final Map nonNullBoolMap = {0: true, 1: false, 2: true}; + +final Map nonNullEnumMap = { + NIAnEnum.one: NIAnEnum.one, + NIAnEnum.two: NIAnEnum.two, + NIAnEnum.three: NIAnEnum.three, + NIAnEnum.fortyTwo: NIAnEnum.fortyTwo, +}; + +final Map> nonNullListMap = >{ + 0: nonNullList, + 1: nonNullStringList, + 2: nonNullDoubleList, + 4: nonNullIntList, + 5: nonNullBoolList, + 6: nonNullEnumList, +}; + +final Map> nonNullMapMap = >{ + 0: nonNullMap, + 1: nonNullStringMap, + 2: nonNullDoubleMap, + 4: nonNullIntMap, + 5: nonNullBoolMap, + 6: nonNullEnumMap, +}; + +final List> nonNullMapList = >[ + nonNullMap, + nonNullStringMap, + nonNullDoubleMap, + nonNullIntMap, + nonNullBoolMap, + nonNullEnumMap, +]; + +final List list = ['Thing 1', 2, true, 3.14, null]; + +final List stringList = [ + 'Thing 1', + '2', + 'true', + '3.14', + null, +]; + +final List intList = [1, 2, 3, 4, null]; + +final List doubleList = [1, 2.99999, 3, 3.14, null]; + +final List boolList = [true, false, true, false, null]; + +final List enumList = [ + NIAnEnum.one, + NIAnEnum.two, + NIAnEnum.three, + NIAnEnum.fortyTwo, + NIAnEnum.fourHundredTwentyTwo, + null, +]; + +final List?> listList = ?>[ + list, + stringList, + intList, + doubleList, + boolList, + enumList, + null, +]; + +final Map map = { + 'a': 1, + 'b': 2.0, + 'c': 'three', + 'd': false, + 'e': null, +}; + +final Map stringMap = { + 'a': '1', + 'b': '2.0', + 'c': 'three', + 'd': 'false', + 'e': 'null', + 'f': null, +}; + +final Map intMap = {0: 0, 1: 1, 2: 3, 4: -1, 5: null}; + +final Map doubleMap = { + 0.0: 0, + 1.1: 2.0, + 3: 0.3, + -.4: -0.2, + 1111111111111111.11111111111111111111111111111111111111111111: null, +}; + +final Map boolMap = { + 0: true, + 1: false, + 2: true, + 3: null, +}; + +final Map enumMap = { + NIAnEnum.one: NIAnEnum.one, + NIAnEnum.two: NIAnEnum.two, + NIAnEnum.three: NIAnEnum.three, + NIAnEnum.fortyTwo: NIAnEnum.fortyTwo, + NIAnEnum.fourHundredTwentyTwo: null, +}; + +final Map?> listMap = ?>{ + 0: list, + 1: stringList, + 2: doubleList, + 4: intList, + 5: boolList, + 6: enumList, + 7: null, +}; + +final Map?> mapMap = ?>{ + 0: map, + 1: stringMap, + 2: doubleMap, + 4: intMap, + 5: boolMap, + 6: enumMap, + 7: null, +}; + +final List?> mapList = ?>[ + map, + stringMap, + doubleMap, + intMap, + boolMap, + enumMap, + null, +]; + +final NIAllNullableTypesWithoutRecursion +genericNIAllNullableTypesWithoutRecursion = NIAllNullableTypesWithoutRecursion( + aNullableBool: true, + aNullableInt: regularInt, + aNullableInt64: biggerThanBigInt, + aNullableDouble: doublePi, + aNullableString: 'Hello host!', + aNullableByteArray: Uint8List.fromList([1, 2, 3]), + aNullable4ByteArray: Int32List.fromList([4, 5, 6]), + aNullable8ByteArray: Int64List.fromList([7, 8, 9]), + aNullableFloatArray: Float64List.fromList([2.71828, doublePi]), + aNullableEnum: NIAnEnum.fourHundredTwentyTwo, + aNullableObject: 'nullable', + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: list, + listList: listList, + mapList: mapList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: map, + listMap: listMap, + mapMap: mapMap, +); + +final List +allNullableTypesWithoutRecursionList = [ + genericNIAllNullableTypesWithoutRecursion, + NIAllNullableTypesWithoutRecursion(), + null, +]; + +final Map +allNullableTypesWithoutRecursionMap = + { + 0: genericNIAllNullableTypesWithoutRecursion, + 1: NIAllNullableTypesWithoutRecursion(), + 2: null, + }; + +final NIAllTypes genericNIAllTypes = NIAllTypes( + aBool: true, + anInt: regularInt, + anInt64: biggerThanBigInt, + aDouble: doublePi, + aString: 'Hello host!', + aByteArray: Uint8List.fromList([1, 2, 3]), + a4ByteArray: Int32List.fromList([4, 5, 6]), + a8ByteArray: Int64List.fromList([7, 8, 9]), + aFloatArray: Float64List.fromList([2.71828, doublePi]), + anEnum: NIAnEnum.fortyTwo, + anObject: 'notNullable', + list: nonNullList, + stringList: nonNullStringList, + intList: nonNullIntList, + doubleList: nonNullDoubleList, + boolList: nonNullBoolList, + enumList: nonNullEnumList, + objectList: nonNullList, + listList: nonNullListList, + mapList: nonNullMapList, + map: nonNullMap, + stringMap: nonNullStringMap, + intMap: nonNullIntMap, + // doubleMap: nonNullDoubleMap, + // boolMap: nonNullBoolMap, + enumMap: nonNullEnumMap, + objectMap: nonNullMap, + listMap: nonNullListMap, + mapMap: nonNullMapMap, +); + +final List allTypesClassList = [ + genericNIAllTypes, + null, +]; + +final Map allTypesClassMap = { + 0: genericNIAllTypes, + 1: null, +}; + +final NIAllNullableTypes genericNIAllNullableTypes = NIAllNullableTypes( + aNullableBool: true, + aNullableInt: regularInt, + aNullableInt64: biggerThanBigInt, + aNullableDouble: doublePi, + aNullableString: 'Hello host!', + aNullableByteArray: Uint8List.fromList([1, 2, 3]), + aNullable4ByteArray: Int32List.fromList([4, 5, 6]), + aNullable8ByteArray: Int64List.fromList([7, 8, 9]), + aNullableFloatArray: Float64List.fromList([2.71828, doublePi]), + aNullableEnum: NIAnEnum.fourHundredTwentyTwo, + aNullableObject: 0, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: list, + listList: listList, + mapList: mapList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: map, + listMap: listMap, + mapMap: mapMap, +); + +final List nonNullNIAllNullableTypesList = + [genericNIAllNullableTypes, NIAllNullableTypes()]; + +final Map nonNullNIAllNullableTypesMap = + { + 0: genericNIAllNullableTypes, + 1: NIAllNullableTypes(), + }; + +final List +nonNullNIAllNullableTypesWithoutRecursionList = + [ + genericNIAllNullableTypesWithoutRecursion, + NIAllNullableTypesWithoutRecursion(), + ]; + +final Map +nonNullNIAllNullableTypesWithoutRecursionMap = + { + 0: genericNIAllNullableTypesWithoutRecursion, + 1: NIAllNullableTypesWithoutRecursion(), + }; + +final List allNullableTypesList = [ + genericNIAllNullableTypes, + NIAllNullableTypes(), + null, +]; + +final Map allNullableTypesMap = + { + 0: genericNIAllNullableTypes, + 1: NIAllNullableTypes(), + 2: null, + }; + +final NIAllNullableTypes recursiveNIAllNullableTypes = NIAllNullableTypes( + aNullableBool: true, + aNullableInt: regularInt, + aNullableInt64: biggerThanBigInt, + aNullableDouble: doublePi, + aNullableString: 'Hello host!', + aNullableByteArray: Uint8List.fromList([1, 2, 3]), + aNullable4ByteArray: Int32List.fromList([4, 5, 6]), + aNullable8ByteArray: Int64List.fromList([7, 8, 9]), + aNullableFloatArray: Float64List.fromList([2.71828, doublePi]), + aNullableEnum: NIAnEnum.fourHundredTwentyTwo, + aNullableObject: 0, + allNullableTypes: genericNIAllNullableTypes, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: list, + listList: listList, + mapList: mapList, + recursiveClassList: allNullableTypesList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: map, + listMap: listMap, + mapMap: mapMap, + recursiveClassMap: allNullableTypesMap, +); + +NIAllClassesWrapper classWrapperMaker() { + return NIAllClassesWrapper( + allNullableTypes: recursiveNIAllNullableTypes, + allNullableTypesWithoutRecursion: genericNIAllNullableTypesWithoutRecursion, + allTypes: genericNIAllTypes, + classList: allTypesClassList, + classMap: allTypesClassMap, + nullableClassList: allNullableTypesWithoutRecursionList, + nullableClassMap: allNullableTypesWithoutRecursionMap, + ); +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart index c3e553e368c6..ba18120bd03e 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -152,6 +151,11 @@ class UnusedClass { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// A class containing all supported types. @@ -358,6 +362,11 @@ class AllTypes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// A class containing all supported nullable types. @@ -585,6 +594,11 @@ class AllNullableTypes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// The primary purpose for this class is to ensure coverage of Swift structs @@ -795,6 +809,11 @@ class AllNullableTypesWithoutRecursion { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// A class for testing nested class handling. @@ -883,6 +902,11 @@ class AllClassesWrapper { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// A data class containing a List, used in unit tests. @@ -919,6 +943,11 @@ class TestMessage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -987,8 +1016,8 @@ class _PigeonCodec extends StandardMessageCodec { /// The core interface that each host language plugin must implement in /// platform_test integration tests. class HostIntegrationCoreApi { - /// Constructor for [HostIntegrationCoreApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [HostIntegrationCoreApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. HostIntegrationCoreApi({ BinaryMessenger? binaryMessenger, @@ -997,8 +1026,8 @@ class HostIntegrationCoreApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; @@ -6123,8 +6152,8 @@ abstract class FlutterIntegrationCoreApi { /// An API that can be implemented for minimal, compile-only tests. class HostTrivialApi { - /// Constructor for [HostTrivialApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [HostTrivialApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. HostTrivialApi({ BinaryMessenger? binaryMessenger, @@ -6133,8 +6162,8 @@ class HostTrivialApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; @@ -6160,8 +6189,8 @@ class HostTrivialApi { /// A simple API implemented in some unit tests. class HostSmallApi { - /// Constructor for [HostSmallApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [HostSmallApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. HostSmallApi({ BinaryMessenger? binaryMessenger, @@ -6170,8 +6199,8 @@ class HostSmallApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart index 06185b61738e..3600f12bf9f5 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -165,6 +164,11 @@ class DataWithEnum { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -201,8 +205,8 @@ class _PigeonCodec extends StandardMessageCodec { /// This comment is to test api documentation comments. class EnumApi2Host { - /// Constructor for [EnumApi2Host]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [EnumApi2Host]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. EnumApi2Host({ BinaryMessenger? binaryMessenger, @@ -211,8 +215,8 @@ class EnumApi2Host { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart index 814f9efc5f50..97a8f706ad77 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -306,6 +305,11 @@ class EventAllNullableTypes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } sealed class PlatformEvent {} @@ -343,6 +347,11 @@ class IntEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class StringEvent extends PlatformEvent { @@ -378,6 +387,11 @@ class StringEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class BoolEvent extends PlatformEvent { @@ -413,6 +427,11 @@ class BoolEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class DoubleEvent extends PlatformEvent { @@ -448,6 +467,11 @@ class DoubleEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class ObjectsEvent extends PlatformEvent { @@ -483,6 +507,11 @@ class ObjectsEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class EnumEvent extends PlatformEvent { @@ -518,6 +547,11 @@ class EnumEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class ClassEvent extends PlatformEvent { @@ -553,6 +587,11 @@ class ClassEvent extends PlatformEvent { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_without_classes_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_without_classes_tests.gen.dart index 80e794008d43..c348e4b5d453 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_without_classes_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_without_classes_tests.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/flutter_unittests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/flutter_unittests.gen.dart index f34e47cf80b1..a86f2e065f65 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/flutter_unittests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/flutter_unittests.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -134,6 +133,11 @@ class FlutterSearchRequest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class FlutterSearchReply { @@ -174,6 +178,11 @@ class FlutterSearchReply { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class FlutterSearchRequests { @@ -209,6 +218,11 @@ class FlutterSearchRequests { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class FlutterSearchReplies { @@ -244,6 +258,11 @@ class FlutterSearchReplies { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -288,16 +307,16 @@ class _PigeonCodec extends StandardMessageCodec { } class Api { - /// Constructor for [Api]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [Api]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. Api({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart index 5bccedeb9f2f..bccfad59ad5d 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -173,6 +172,11 @@ class MessageSearchRequest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// This comment is to test class documentation comments. @@ -224,6 +228,11 @@ class MessageSearchReply { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } /// This comment is to test class documentation comments. @@ -261,6 +270,11 @@ class MessageNested { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -309,8 +323,8 @@ class _PigeonCodec extends StandardMessageCodec { /// /// This comment also tests multiple line comments. class MessageApi { - /// Constructor for [MessageApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [MessageApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MessageApi({ BinaryMessenger? binaryMessenger, @@ -319,8 +333,8 @@ class MessageApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; @@ -371,8 +385,8 @@ class MessageApi { /// This comment is to test api documentation comments. class MessageNestedApi { - /// Constructor for [MessageNestedApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [MessageNestedApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MessageNestedApi({ BinaryMessenger? binaryMessenger, @@ -381,8 +395,8 @@ class MessageNestedApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/multiple_arity.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/multiple_arity.gen.dart index 42bfad79d7b5..8aa6d6a888ae 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/multiple_arity.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/multiple_arity.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -74,8 +73,8 @@ class _PigeonCodec extends StandardMessageCodec { } class MultipleArityHostApi { - /// Constructor for [MultipleArityHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [MultipleArityHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MultipleArityHostApi({ BinaryMessenger? binaryMessenger, @@ -84,8 +83,8 @@ class MultipleArityHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.dart new file mode 100644 index 000000000000..3130e84da4f9 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.dart @@ -0,0 +1,24744 @@ +// 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, do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: unused_import, unused_shown_name +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:ffi'; +import 'dart:io' show Platform; +import 'dart:typed_data' + show Float32List, Float64List, Int32List, Int64List, Int8List, TypedData; +import 'package:ffi/ffi.dart'; +import 'package:flutter/services.dart'; +import 'package:jni/jni.dart'; +import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; +import 'package:objective_c/objective_c.dart'; +import './ni_tests.gen.ffi.dart' as ffi_bridge; +import './ni_tests.gen.jni.dart' as jni_bridge; + +Object? _extractReplyValueOrThrow( + List? replyList, + String channelName, { + required bool isNullValid, +}) { + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } + return replyList.firstOrNull; +} + +List wrapResponse({ + Object? result, + PlatformException? error, + bool empty = false, +}) { + if (empty) { + return []; + } + if (error == null) { + return [result]; + } + return [error.code, error.message, error.details]; +} + +bool _deepEquals(Object? a, Object? b) { + if (identical(a, b)) { + return true; + } + if (a is double && b is double) { + if (a.isNaN && b.isNaN) { + return true; + } + return a == b; + } + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + if (a.length != b.length) { + return false; + } + for (final MapEntry entryA in a.entries) { + bool found = false; + for (final MapEntry entryB in b.entries) { + if (_deepEquals(entryA.key, entryB.key)) { + if (_deepEquals(entryA.value, entryB.value)) { + found = true; + break; + } else { + return false; + } + } + } + if (!found) { + return false; + } + } + return true; + } + return a == b; +} + +int _deepHash(Object? value) { + if (value is List) { + return Object.hashAll(value.map(_deepHash)); + } + if (value is Map) { + int result = 0; + for (final MapEntry entry in value.entries) { + result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); + } + return result; + } + if (value is double && value.isNaN) { + // Normalize NaN to a consistent hash. + return 0x7FF8000000000000.hashCode; + } + if (value is double && value == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + return 0.0.hashCode; + } + return value.hashCode; +} + +class _PigeonJniCodec { + static JObject get _kotlinUnit { + final JClass unitClass = JClass.forName('kotlin/Unit'); + try { + return unitClass + .staticFieldId('INSTANCE', 'Lkotlin/Unit;') + .get(unitClass, JObject.type); + } finally { + unitClass.release(); + } + } + + static Object? readValue(JObject? value) { + if (value == null) { + return null; + } + if (value.isA(JLong.type)) { + return (value.as(JLong.type)).longValue(); + } else if (value.isA(JDouble.type)) { + return (value.as(JDouble.type)).doubleValue(); + } else if (value.isA(JString.type)) { + return (value.as(JString.type)).toDartString(); + } else if (value.isA(JBoolean.type)) { + return (value.as(JBoolean.type)).booleanValue(); + } else if (value.isA(JByteArray.type)) { + final JByteArray array = value.as(JByteArray.type); + return array.getRange(0, array.length).buffer.asUint8List(); + } else if (value.isA(JIntArray.type)) { + final JIntArray array = value.as(JIntArray.type); + return array.getRange(0, array.length); + } else if (value.isA(JLongArray.type)) { + final JLongArray array = value.as(JLongArray.type); + return array.getRange(0, array.length); + } else if (value.isA(JDoubleArray.type)) { + final JDoubleArray array = value.as(JDoubleArray.type); + return array.getRange(0, array.length); + } else if (value.isA>(JList.type as JType>)) { + final List list = value.as(JList.type).asDart(); + final res = []; + // Cache the length before iterating to avoid a JNI hop per iteration. + final int len = list.length; + for (int i = 0; i < len; i++) { + res.add(readValue(list[i])); + } + return res; + } else if (value.isA>( + JMap.type as JType>, + )) { + final Map map = value.as(JMap.type).asDart(); + final res = {}; + for (final MapEntry entry in map.entries) { + res[readValue(entry.key)] = readValue(entry.value); + } + return res; + } else if (value.isA( + jni_bridge.NIUnusedClass.type, + )) { + return NIUnusedClass.fromJni(value.as(jni_bridge.NIUnusedClass.type)); + } else if (value.isA(jni_bridge.NIAllTypes.type)) { + return NIAllTypes.fromJni(value.as(jni_bridge.NIAllTypes.type)); + } else if (value.isA( + jni_bridge.NIAllNullableTypes.type, + )) { + return NIAllNullableTypes.fromJni( + value.as(jni_bridge.NIAllNullableTypes.type), + ); + } else if (value.isA( + jni_bridge.NIAllNullableTypesWithoutRecursion.type, + )) { + return NIAllNullableTypesWithoutRecursion.fromJni( + value.as(jni_bridge.NIAllNullableTypesWithoutRecursion.type), + ); + } else if (value.isA( + jni_bridge.NIAllClassesWrapper.type, + )) { + return NIAllClassesWrapper.fromJni( + value.as(jni_bridge.NIAllClassesWrapper.type), + ); + } else if (value.isA(jni_bridge.NIAnEnum.type)) { + return NIAnEnum.fromJni(value.as(jni_bridge.NIAnEnum.type)); + } else if (value.isA( + jni_bridge.NIAnotherEnum.type, + )) { + return NIAnotherEnum.fromJni(value.as(jni_bridge.NIAnotherEnum.type)); + } else { + throw ArgumentError.value(value); + } + } + + static T writeValue(Object? value) { + if (value == null) { + return null as T; + } + if (value is bool) { + return JBoolean(value) as T; + } else if (value is double) { + return JDouble(value) as T; + // ignore: avoid_double_and_int_checks + } else if (value is int) { + return JLong(value) as T; + } else if (value is String) { + return value.toJString() as T; + } else if (value is Uint8List) { + final JByteArray array = JByteArray(value.length); + array.setRange( + 0, + value.length, + Int8List.view(value.buffer, value.offsetInBytes, value.length), + ); + return array as T; + } else if (value is Int32List) { + final JIntArray array = JIntArray(value.length); + array.setRange(0, value.length, value); + return array as T; + } else if (value is Int64List) { + final JLongArray array = JLongArray(value.length); + array.setRange(0, value.length, value); + return array as T; + } else if (value is Float64List) { + final JDoubleArray array = JDoubleArray(value.length); + array.setRange(0, value.length, value); + return array as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value + .map( + (e) => writeValue(e), + ) + .toJList() + as T; + } else if (value is List) { + return value + .map( + (e) => writeValue(e), + ) + .toJList() + as T; + } else if (value is List) { + return value + .map( + (e) => + writeValue( + e, + ), + ) + .toJList() + as T; + } else if (value is List) { + return value + .map( + (e) => writeValue(e), + ) + .toJList() + as T; + } else if (value is List) { + return value + .map( + (e) => writeValue(e), + ) + .toJList() + as T; + } else if (value is List) { + return value + .map( + (e) => writeValue(e), + ) + .toJList() + as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() + as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List>) { + return value + .map>((e) => writeValue>(e)) + .toJList() + as T; + } else if (value is List?>) { + return value + .map?>((e) => writeValue?>(e)) + .toJList() + as T; + } else if (value is List>) { + return value + .map>( + (e) => writeValue>(e), + ) + .toJList() + as T; + } else if (value is List?>) { + return value + .map?>( + (e) => writeValue?>(e), + ) + .toJList() + as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is List) { + return value.map((e) => writeValue(e)).toJList() as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry( + writeValue(k), + writeValue(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry( + writeValue(k), + writeValue(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => + MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry( + writeValue(k), + writeValue(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry( + writeValue(k), + writeValue(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry( + writeValue(k), + writeValue(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => MapEntry( + writeValue(k), + writeValue(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => + MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => + MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is Map>) { + return value + .map>( + (k, v) => MapEntry( + writeValue(k), + writeValue>(v), + ), + ) + .toJMap() + as T; + } else if (value is Map?>) { + return value + .map?>( + (k, v) => MapEntry( + writeValue(k), + writeValue?>(v), + ), + ) + .toJMap() + as T; + } else if (value is Map>) { + return value + .map>( + (k, v) => MapEntry( + writeValue(k), + writeValue>(v), + ), + ) + .toJMap() + as T; + } else if (value is Map?>) { + return value + .map?>( + (k, v) => MapEntry( + writeValue(k), + writeValue?>(v), + ), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => + MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => + MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is Map) { + return value + .map( + (k, v) => + MapEntry(writeValue(k), writeValue(v)), + ) + .toJMap() + as T; + } else if (value is NIUnusedClass) { + return value.toJni() as T; + } else if (value is NIAllTypes) { + return value.toJni() as T; + } else if (value is NIAllNullableTypes) { + return value.toJni() as T; + } else if (value is NIAllNullableTypesWithoutRecursion) { + return value.toJni() as T; + } else if (value is NIAllClassesWrapper) { + return value.toJni() as T; + } else if (value is NIAnEnum) { + return value.toJni() as T; + } else if (value is NIAnotherEnum) { + return value.toJni() as T; + } else { + throw ArgumentError.value(value); + } + } +} + +class _PigeonFfiCodec { + static Object? readValue(ObjCObject? value, [Type? type, Type? type2]) { + if (value == null || ffi_bridge.NiTestsPigeonInternalNull.isA(value)) { + return null; + } else if (NSNumber.isA(value)) { + final NSNumber numValue = NSNumber.as(value); + if (type == double) { + return numValue.doubleValue; + } else if (type == bool) { + return numValue.boolValue; + } else if (type == NIAnEnum) { + return NIAnEnum.fromNSNumber(numValue); + } else if (type == NIAnotherEnum) { + return NIAnotherEnum.fromNSNumber(numValue); + } + + return numValue.longValue; + } else if (NSString.isA(value)) { + return (NSString.as(value)).toDartString(); + } else if (ffi_bridge.NiTestsPigeonTypedData.isA(value)) { + return getValueFromPigeonTypedData( + value as ffi_bridge.NiTestsPigeonTypedData, + ); + } else if (NSArray.isA(value)) { + final NSArray array = NSArray.as(value); + final List res = []; + for (int i = 0; i < array.count; i++) { + res.add(readValue(array.objectAtIndex(i), type)); + } + return res; + } else if (NSDictionary.isA(value)) { + final NSDictionary dict = NSDictionary.as(value); + final NSArray keys = dict.allKeys; + final Map res = {}; + for (int i = 0; i < keys.count; i++) { + final ObjCObject key = keys.objectAtIndex(i); + res[readValue(key, type, type2)] = readValue( + dict.objectForKey(key), + type, + type2, + ); + } + return res; + } else if (ffi_bridge.NiTestsNumberWrapper.isA(value)) { + return convertNumberWrapperToDart( + ffi_bridge.NiTestsNumberWrapper.as(value), + ); + } else if (ffi_bridge.NIUnusedClassBridge.isA(value)) { + return NIUnusedClass.fromFfi(ffi_bridge.NIUnusedClassBridge.as(value)); + } else if (ffi_bridge.NIAllTypesBridge.isA(value)) { + return NIAllTypes.fromFfi(ffi_bridge.NIAllTypesBridge.as(value)); + } else if (ffi_bridge.NIAllNullableTypesBridge.isA(value)) { + return NIAllNullableTypes.fromFfi( + ffi_bridge.NIAllNullableTypesBridge.as(value), + ); + } else if (ffi_bridge.NIAllNullableTypesWithoutRecursionBridge.isA(value)) { + return NIAllNullableTypesWithoutRecursion.fromFfi( + ffi_bridge.NIAllNullableTypesWithoutRecursionBridge.as(value), + ); + } else if (ffi_bridge.NIAllClassesWrapperBridge.isA(value)) { + return NIAllClassesWrapper.fromFfi( + ffi_bridge.NIAllClassesWrapperBridge.as(value), + ); + } else { + throw ArgumentError.value(value); + } + } + + static T writeValue( + Object? value, { + bool generic = false, + }) { + if (value == null) { + if (isTypeOrNullableType(ObjCObject) || + isTypeOrNullableType(NSObject)) { + return ffi_bridge.NiTestsPigeonInternalNull() as T; + } + return null as T; + } + if (value is bool) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithLong(value ? 1 : 0)) + as T; + } else if (value is double) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithDouble(value)) + as T; + // ignore: avoid_double_and_int_checks + } else if (value is int) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithLong(value)) + as T; + } else if (value is Enum) { + return (generic + ? convertToFfiNumberWrapper(value) + : NSNumber.alloc().initWithLong(value.index)) + as T; + } else if (value is String) { + return NSString(value) as T; + } else if (value is TypedData) { + return toPigeonTypedData(value) as T; + } else if (value is List && isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final bool entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final double entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List && isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final int entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final String entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NIAllNullableTypes entry in value) { + res.addObject( + writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NIAnEnum entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NIAllNullableTypesWithoutRecursion? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue( + entry, + generic: true, + ), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NIAllTypes? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NIAllNullableTypes? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue( + entry, + generic: true, + ), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NIAnEnum? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final bool? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final double? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final int? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final String? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List> && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final List entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List?> && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final List? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List> && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final Map entry in value) { + res.addObject(writeValue(entry, generic: true)); + } + return res as T; + } else if (value is List?> && + isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final Map? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List) { + final NSMutableArray res = NSMutableArray(); + for (final Object? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NiTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry + in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map> && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry> entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map?> && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry?> entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map> && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry> entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map?> && + isTypeOrNullableType(T)) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry?> entry + in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is Map) { + final NSMutableDictionary res = NSMutableDictionary(); + for (final MapEntry entry in value.entries) { + res.setObject( + writeValue(entry.value, generic: true), + forKey: NSCopying.as(writeValue(entry.key, generic: true)), + ); + } + return res as T; + } else if (value is NIUnusedClass) { + return value.toFfi() as T; + } else if (value is NIAllTypes) { + return value.toFfi() as T; + } else if (value is NIAllNullableTypes) { + return value.toFfi() as T; + } else if (value is NIAllNullableTypesWithoutRecursion) { + return value.toFfi() as T; + } else if (value is NIAllClassesWrapper) { + return value.toFfi() as T; + } else { + throw ArgumentError.value(value); + } + } +} + +ffi_bridge.NiTestsPigeonTypedData toPigeonTypedData(TypedData value) { + final int lengthInBytes = value.lengthInBytes; + if (value is Uint8List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = NSData.dataWithBytes( + ptr.cast(), + length: lengthInBytes, + ); + calloc.free(ptr); + return ffi_bridge.NiTestsPigeonTypedData.alloc().initWithData( + nsData, + type: 0, + ); + } else if (value is Int32List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = NSData.dataWithBytes( + ptr.cast(), + length: lengthInBytes, + ); + calloc.free(ptr); + return ffi_bridge.NiTestsPigeonTypedData.alloc().initWithData( + nsData, + type: 1, + ); + } else if (value is Int64List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = NSData.dataWithBytes( + ptr.cast(), + length: lengthInBytes, + ); + calloc.free(ptr); + return ffi_bridge.NiTestsPigeonTypedData.alloc().initWithData( + nsData, + type: 2, + ); + } else if (value is Float32List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = NSData.dataWithBytes( + ptr.cast(), + length: lengthInBytes, + ); + calloc.free(ptr); + return ffi_bridge.NiTestsPigeonTypedData.alloc().initWithData( + nsData, + type: 3, + ); + } else if (value is Float64List) { + final int length = value.length; + final Pointer ptr = calloc(length); + ptr.asTypedList(length).setAll(0, value); + final NSData nsData = NSData.dataWithBytes( + ptr.cast(), + length: lengthInBytes, + ); + calloc.free(ptr); + return ffi_bridge.NiTestsPigeonTypedData.alloc().initWithData( + nsData, + type: 4, + ); + } + throw ArgumentError.value(value); +} + +Object? getValueFromPigeonTypedData(ffi_bridge.NiTestsPigeonTypedData value) { + final NSData data = value.data; + final Pointer bytes = data.bytes; + switch (value.type) { + case 0: + return Uint8List.fromList(bytes.cast().asTypedList(data.length)); + case 1: + return Int32List.fromList( + bytes.cast().asTypedList(data.length ~/ 4), + ); + case 2: + return Int64List.fromList( + bytes.cast().asTypedList(data.length ~/ 8), + ); + case 3: + return Float32List.fromList( + bytes.cast().asTypedList(data.length ~/ 4), + ); + case 4: + return Float64List.fromList( + bytes.cast().asTypedList(data.length ~/ 8), + ); + default: + throw ArgumentError.value(value); + } +} + +Object? convertNumberWrapperToDart(ffi_bridge.NiTestsNumberWrapper value) { + switch (value.type) { + case 1: + return value.number.longValue; + case 2: + return value.number.doubleValue; + case 3: + return value.number.boolValue; + case 4: + return NIAnEnum.fromNSNumber(value.number); + case 5: + return NIAnotherEnum.fromNSNumber(value.number); + default: + throw ArgumentError.value(value); + } +} + +ffi_bridge.NiTestsNumberWrapper convertToFfiNumberWrapper(Object value) { + switch (value) { + case int _: + return ffi_bridge.NiTestsNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithLong(value), + type: 1, + ); + case double _: + return ffi_bridge.NiTestsNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithDouble(value), + type: 2, + ); + case bool _: + return ffi_bridge.NiTestsNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithLong(value ? 1 : 0), + type: 3, + ); + case NIAnEnum _: + return ffi_bridge.NiTestsNumberWrapper.alloc().initWithNumber( + value.toNSNumber(), + type: 4, + ); + case NIAnotherEnum _: + return ffi_bridge.NiTestsNumberWrapper.alloc().initWithNumber( + value.toNSNumber(), + type: 5, + ); + default: + throw ArgumentError.value(value); + } +} + +bool isType(Type t) => T == t; +bool isTypeOrNullableType(Type t) => isType(t) || isType(t); + +void _throwNoInstanceError(String channelName) { + String nameString = 'named $channelName'; + if (channelName == defaultInstanceName) { + nameString = 'with no name'; + } + final String error = 'No instance $nameString has been registered.'; + throw ArgumentError(error); +} + +void _throwIfFfiError(ffi_bridge.NiTestsError error) { + if (error.code != null) { + throw _wrapFfiError(error); + } +} + +PlatformException _wrapFfiError(ffi_bridge.NiTestsError error) => + PlatformException( + code: error.code!.toDartString(), + message: error.message?.toDartString(), + details: NSString.isA(error.details) + ? error.details!.toDartString() + : error.details, + ); + +void _reportFfiError(ffi_bridge.NiTestsError errorOut, Object e) { + if (e is PlatformException) { + errorOut.code = NSString(e.code); + errorOut.message = NSString(e.message ?? ''); + errorOut.details = NSString((e.details ?? '').toString()); + } else { + errorOut.code = NSString('error'); + errorOut.message = NSString(e.toString()); + errorOut.details = null; + } +} + +PlatformException _wrapJniException(JThrowable e) { + if (e.isA(jni_bridge.NiTestsError.type)) { + final jni_bridge.NiTestsError pigeonError = e.as( + jni_bridge.NiTestsError.type, + ); + return PlatformException( + code: pigeonError.code.toDartString(), + message: pigeonError.message?.toDartString(), + details: pigeonError.details?.isA(JString.type) ?? false + ? pigeonError.details!.as(JString.type).toDartString() + : pigeonError.details, + stacktrace: e.javaStackTrace, + ); + } + return PlatformException( + code: 'PlatformException', + message: e.message, + details: e, + stacktrace: e.javaStackTrace, + ); +} + +enum NIAnEnum { + one, + two, + three, + fortyTwo, + fourHundredTwentyTwo; + + jni_bridge.NIAnEnum toJni() { + return jni_bridge.NIAnEnum.Companion.ofRaw(index)!; + } + + static NIAnEnum? fromJni(jni_bridge.NIAnEnum? jniEnum) { + return jniEnum == null ? null : NIAnEnum.values[jniEnum.raw]; + } + + NSNumber toFfi() { + return _PigeonFfiCodec.writeValue(index); + } + + NSNumber toNSNumber() { + return NSNumber.alloc().initWithLong(index); + } + + static NIAnEnum? fromNSNumber(NSNumber? ffiEnum) { + return ffiEnum == null ? null : NIAnEnum.values[ffiEnum.intValue]; + } +} + +enum NIAnotherEnum { + justInCase; + + jni_bridge.NIAnotherEnum toJni() { + return jni_bridge.NIAnotherEnum.Companion.ofRaw(index)!; + } + + static NIAnotherEnum? fromJni(jni_bridge.NIAnotherEnum? jniEnum) { + return jniEnum == null ? null : NIAnotherEnum.values[jniEnum.raw]; + } + + NSNumber toFfi() { + return _PigeonFfiCodec.writeValue(index); + } + + NSNumber toNSNumber() { + return NSNumber.alloc().initWithLong(index); + } + + static NIAnotherEnum? fromNSNumber(NSNumber? ffiEnum) { + return ffiEnum == null ? null : NIAnotherEnum.values[ffiEnum.intValue]; + } +} + +class NIUnusedClass { + NIUnusedClass({this.aField}); + + Object? aField; + + List _toList() { + return [aField]; + } + + jni_bridge.NIUnusedClass toJni() { + return jni_bridge.NIUnusedClass( + _PigeonJniCodec.writeValue(aField), + ); + } + + ffi_bridge.NIUnusedClassBridge toFfi() { + return ffi_bridge.NIUnusedClassBridge.alloc().initWithAField( + _PigeonFfiCodec.writeValue(aField, generic: true), + ); + } + + Object encode() { + return _toList(); + } + + static NIUnusedClass? fromJni(jni_bridge.NIUnusedClass? jniClass) { + return jniClass == null + ? null + : NIUnusedClass(aField: _PigeonJniCodec.readValue(jniClass.aField)); + } + + static NIUnusedClass? fromFfi(ffi_bridge.NIUnusedClassBridge? ffiClass) { + return ffiClass == null + ? null + : NIUnusedClass(aField: _PigeonFfiCodec.readValue(ffiClass.aField)); + } + + static NIUnusedClass decode(Object result) { + result as List; + return NIUnusedClass(aField: result[0]); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! NIUnusedClass || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(aField, other.aField); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } +} + +/// A class containing all supported types. +class NIAllTypes { + NIAllTypes({ + this.aBool = false, + this.anInt = 0, + this.anInt64 = 0, + this.aDouble = 0, + required this.aByteArray, + required this.a4ByteArray, + required this.a8ByteArray, + required this.aFloatArray, + this.anEnum = NIAnEnum.one, + this.anotherEnum = NIAnotherEnum.justInCase, + this.aString = '', + this.anObject = 0, + required this.list, + required this.stringList, + required this.intList, + required this.doubleList, + required this.boolList, + required this.enumList, + required this.objectList, + required this.listList, + required this.mapList, + required this.map, + required this.stringMap, + required this.intMap, + required this.enumMap, + required this.objectMap, + required this.listMap, + required this.mapMap, + }); + + bool aBool; + + int anInt; + + int anInt64; + + double aDouble; + + Uint8List aByteArray; + + Int32List a4ByteArray; + + Int64List a8ByteArray; + + Float64List aFloatArray; + + NIAnEnum anEnum; + + NIAnotherEnum anotherEnum; + + String aString; + + Object anObject; + + List list; + + List stringList; + + List intList; + + List doubleList; + + List boolList; + + List enumList; + + List objectList; + + List> listList; + + List> mapList; + + Map map; + + Map stringMap; + + Map intMap; + + Map enumMap; + + Map objectMap; + + Map> listMap; + + Map> mapMap; + + List _toList() { + return [ + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ]; + } + + jni_bridge.NIAllTypes toJni() { + return jni_bridge.NIAllTypes( + aBool, + anInt, + anInt64, + aDouble, + _PigeonJniCodec.writeValue(aByteArray), + _PigeonJniCodec.writeValue(a4ByteArray), + _PigeonJniCodec.writeValue(a8ByteArray), + _PigeonJniCodec.writeValue(aFloatArray), + anEnum.toJni(), + anotherEnum.toJni(), + _PigeonJniCodec.writeValue(aString), + _PigeonJniCodec.writeValue(anObject), + _PigeonJniCodec.writeValue>(list), + _PigeonJniCodec.writeValue>(stringList), + _PigeonJniCodec.writeValue>(intList), + _PigeonJniCodec.writeValue>(doubleList), + _PigeonJniCodec.writeValue>(boolList), + _PigeonJniCodec.writeValue>(enumList), + _PigeonJniCodec.writeValue>(objectList), + _PigeonJniCodec.writeValue>>(listList), + _PigeonJniCodec.writeValue>>(mapList), + _PigeonJniCodec.writeValue>(map), + _PigeonJniCodec.writeValue>(stringMap), + _PigeonJniCodec.writeValue>(intMap), + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + _PigeonJniCodec.writeValue>(objectMap), + _PigeonJniCodec.writeValue>>(listMap), + _PigeonJniCodec.writeValue>>(mapMap), + ); + } + + ffi_bridge.NIAllTypesBridge toFfi() { + return ffi_bridge.NIAllTypesBridge.alloc().initWithABool( + aBool, + anInt: anInt, + anInt64: anInt64, + aDouble: aDouble, + aByteArray: _PigeonFfiCodec.writeValue( + aByteArray, + ), + a4ByteArray: + _PigeonFfiCodec.writeValue( + a4ByteArray, + ), + a8ByteArray: + _PigeonFfiCodec.writeValue( + a8ByteArray, + ), + aFloatArray: + _PigeonFfiCodec.writeValue( + aFloatArray, + ), + anEnum: ffi_bridge.NIAnEnum.values[anEnum.index], + anotherEnum: ffi_bridge.NIAnotherEnum.values[anotherEnum.index], + aString: _PigeonFfiCodec.writeValue(aString), + anObject: _PigeonFfiCodec.writeValue(anObject, generic: true), + list: _PigeonFfiCodec.writeValue(list), + stringList: _PigeonFfiCodec.writeValue(stringList), + intList: _PigeonFfiCodec.writeValue(intList), + doubleList: _PigeonFfiCodec.writeValue(doubleList), + boolList: _PigeonFfiCodec.writeValue(boolList), + enumList: _PigeonFfiCodec.writeValue(enumList), + objectList: _PigeonFfiCodec.writeValue(objectList), + listList: _PigeonFfiCodec.writeValue(listList), + mapList: _PigeonFfiCodec.writeValue(mapList), + map: _PigeonFfiCodec.writeValue(map), + stringMap: _PigeonFfiCodec.writeValue(stringMap), + intMap: _PigeonFfiCodec.writeValue(intMap), + enumMap: _PigeonFfiCodec.writeValue(enumMap), + objectMap: _PigeonFfiCodec.writeValue(objectMap), + listMap: _PigeonFfiCodec.writeValue(listMap), + mapMap: _PigeonFfiCodec.writeValue(mapMap), + ); + } + + Object encode() { + return _toList(); + } + + static NIAllTypes? fromJni(jni_bridge.NIAllTypes? jniClass) { + return jniClass == null + ? null + : NIAllTypes( + aBool: jniClass.aBool, + anInt: jniClass.anInt, + anInt64: jniClass.anInt64, + aDouble: jniClass.aDouble, + aByteArray: + (_PigeonJniCodec.readValue(jniClass.aByteArray)! as Uint8List), + a4ByteArray: + (_PigeonJniCodec.readValue(jniClass.a4ByteArray)! as Int32List), + a8ByteArray: + (_PigeonJniCodec.readValue(jniClass.a8ByteArray)! as Int64List), + aFloatArray: + (_PigeonJniCodec.readValue(jniClass.aFloatArray)! + as Float64List), + anEnum: NIAnEnum.fromJni(jniClass.anEnum)!, + anotherEnum: NIAnotherEnum.fromJni(jniClass.anotherEnum)!, + aString: jniClass.aString.toDartString(releaseOriginal: true), + anObject: _PigeonJniCodec.readValue(jniClass.anObject)!, + list: (_PigeonJniCodec.readValue(jniClass.list)! as List) + .cast(), + stringList: + (_PigeonJniCodec.readValue(jniClass.stringList)! + as List) + .cast(), + intList: + (_PigeonJniCodec.readValue(jniClass.intList)! as List) + .cast(), + doubleList: + (_PigeonJniCodec.readValue(jniClass.doubleList)! + as List) + .cast(), + boolList: + (_PigeonJniCodec.readValue(jniClass.boolList)! as List) + .cast(), + enumList: + (_PigeonJniCodec.readValue(jniClass.enumList)! as List) + .cast(), + objectList: + (_PigeonJniCodec.readValue(jniClass.objectList)! + as List) + .cast(), + listList: + (_PigeonJniCodec.readValue(jniClass.listList)! as List) + .cast>(), + mapList: + (_PigeonJniCodec.readValue(jniClass.mapList)! as List) + .cast>(), + map: + (_PigeonJniCodec.readValue(jniClass.map)! + as Map) + .cast(), + stringMap: + (_PigeonJniCodec.readValue(jniClass.stringMap)! + as Map) + .cast(), + intMap: + (_PigeonJniCodec.readValue(jniClass.intMap)! + as Map) + .cast(), + enumMap: + (_PigeonJniCodec.readValue(jniClass.enumMap)! + as Map) + .cast(), + objectMap: + (_PigeonJniCodec.readValue(jniClass.objectMap)! + as Map) + .cast(), + listMap: + (_PigeonJniCodec.readValue(jniClass.listMap)! + as Map) + .cast>(), + mapMap: + (_PigeonJniCodec.readValue(jniClass.mapMap)! + as Map) + .cast>(), + ); + } + + static NIAllTypes? fromFfi(ffi_bridge.NIAllTypesBridge? ffiClass) { + return ffiClass == null + ? null + : NIAllTypes( + aBool: ffiClass.aBool, + anInt: ffiClass.anInt, + anInt64: ffiClass.anInt64, + aDouble: ffiClass.aDouble, + aByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aByteArray)! as Uint8List), + a4ByteArray: + (_PigeonFfiCodec.readValue(ffiClass.a4ByteArray)! as Int32List), + a8ByteArray: + (_PigeonFfiCodec.readValue(ffiClass.a8ByteArray)! as Int64List), + aFloatArray: + (_PigeonFfiCodec.readValue(ffiClass.aFloatArray)! + as Float64List), + anEnum: NIAnEnum.values[ffiClass.anEnum.index], + anotherEnum: NIAnotherEnum.values[ffiClass.anotherEnum.index], + aString: ffiClass.aString.toDartString(), + anObject: _PigeonFfiCodec.readValue(ffiClass.anObject)!, + list: (_PigeonFfiCodec.readValue(ffiClass.list)! as List) + .cast(), + stringList: + (_PigeonFfiCodec.readValue(ffiClass.stringList)! + as List) + .cast(), + intList: + (_PigeonFfiCodec.readValue(ffiClass.intList, int)! + as List) + .cast(), + doubleList: + (_PigeonFfiCodec.readValue(ffiClass.doubleList, double)! + as List) + .cast(), + boolList: + (_PigeonFfiCodec.readValue(ffiClass.boolList, bool)! + as List) + .cast(), + enumList: + (_PigeonFfiCodec.readValue(ffiClass.enumList, NIAnEnum)! + as List) + .cast(), + objectList: + (_PigeonFfiCodec.readValue(ffiClass.objectList)! + as List) + .cast(), + listList: + (_PigeonFfiCodec.readValue(ffiClass.listList)! as List) + .cast>(), + mapList: + (_PigeonFfiCodec.readValue(ffiClass.mapList)! as List) + .cast>(), + map: + (_PigeonFfiCodec.readValue(ffiClass.map)! + as Map) + .cast(), + stringMap: + (_PigeonFfiCodec.readValue(ffiClass.stringMap)! + as Map) + .cast(), + intMap: + (_PigeonFfiCodec.readValue(ffiClass.intMap, int, int)! + as Map) + .cast(), + enumMap: + (_PigeonFfiCodec.readValue( + ffiClass.enumMap, + NIAnEnum, + NIAnEnum, + )! + as Map) + .cast(), + objectMap: + (_PigeonFfiCodec.readValue(ffiClass.objectMap)! + as Map) + .cast(), + listMap: + (_PigeonFfiCodec.readValue(ffiClass.listMap, int)! + as Map) + .cast>(), + mapMap: + (_PigeonFfiCodec.readValue(ffiClass.mapMap, int)! + as Map) + .cast>(), + ); + } + + static NIAllTypes decode(Object result) { + result as List; + return NIAllTypes( + aBool: result[0]! as bool, + anInt: result[1]! as int, + anInt64: result[2]! as int, + aDouble: result[3]! as double, + aByteArray: result[4]! as Uint8List, + a4ByteArray: result[5]! as Int32List, + a8ByteArray: result[6]! as Int64List, + aFloatArray: result[7]! as Float64List, + anEnum: result[8]! as NIAnEnum, + anotherEnum: result[9]! as NIAnotherEnum, + aString: result[10]! as String, + anObject: result[11]!, + list: result[12]! as List, + stringList: (result[13]! as List).cast(), + intList: (result[14]! as List).cast(), + doubleList: (result[15]! as List).cast(), + boolList: (result[16]! as List).cast(), + enumList: (result[17]! as List).cast(), + objectList: (result[18]! as List).cast(), + listList: (result[19]! as List).cast>(), + mapList: (result[20]! as List).cast>(), + map: result[21]! as Map, + stringMap: (result[22]! as Map).cast(), + intMap: (result[23]! as Map).cast(), + enumMap: (result[24]! as Map) + .cast(), + objectMap: (result[25]! as Map).cast(), + listMap: (result[26]! as Map) + .cast>(), + mapMap: (result[27]! as Map) + .cast>(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! NIAllTypes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(aBool, other.aBool) && + _deepEquals(anInt, other.anInt) && + _deepEquals(anInt64, other.anInt64) && + _deepEquals(aDouble, other.aDouble) && + _deepEquals(aByteArray, other.aByteArray) && + _deepEquals(a4ByteArray, other.a4ByteArray) && + _deepEquals(a8ByteArray, other.a8ByteArray) && + _deepEquals(aFloatArray, other.aFloatArray) && + _deepEquals(anEnum, other.anEnum) && + _deepEquals(anotherEnum, other.anotherEnum) && + _deepEquals(aString, other.aString) && + _deepEquals(anObject, other.anObject) && + _deepEquals(list, other.list) && + _deepEquals(stringList, other.stringList) && + _deepEquals(intList, other.intList) && + _deepEquals(doubleList, other.doubleList) && + _deepEquals(boolList, other.boolList) && + _deepEquals(enumList, other.enumList) && + _deepEquals(objectList, other.objectList) && + _deepEquals(listList, other.listList) && + _deepEquals(mapList, other.mapList) && + _deepEquals(map, other.map) && + _deepEquals(stringMap, other.stringMap) && + _deepEquals(intMap, other.intMap) && + _deepEquals(enumMap, other.enumMap) && + _deepEquals(objectMap, other.objectMap) && + _deepEquals(listMap, other.listMap) && + _deepEquals(mapMap, other.mapMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } +} + +/// A class containing all supported nullable types. +class NIAllNullableTypes { + NIAllNullableTypes({ + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + this.allNullableTypes, + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + this.recursiveClassList, + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + this.recursiveClassMap, + }); + + bool? aNullableBool; + + int? aNullableInt; + + int? aNullableInt64; + + double? aNullableDouble; + + Uint8List? aNullableByteArray; + + Int32List? aNullable4ByteArray; + + Int64List? aNullable8ByteArray; + + Float64List? aNullableFloatArray; + + NIAnEnum? aNullableEnum; + + NIAnotherEnum? anotherNullableEnum; + + String? aNullableString; + + Object? aNullableObject; + + NIAllNullableTypes? allNullableTypes; + + List? list; + + List? stringList; + + List? intList; + + List? doubleList; + + List? boolList; + + List? enumList; + + List? objectList; + + List?>? listList; + + List?>? mapList; + + List? recursiveClassList; + + Map? map; + + Map? stringMap; + + Map? intMap; + + Map? enumMap; + + Map? objectMap; + + Map?>? listMap; + + Map?>? mapMap; + + Map? recursiveClassMap; + + List _toList() { + return [ + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap, + ]; + } + + jni_bridge.NIAllNullableTypes toJni() { + return jni_bridge.NIAllNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableInt64), + _PigeonJniCodec.writeValue(aNullableDouble), + _PigeonJniCodec.writeValue(aNullableByteArray), + _PigeonJniCodec.writeValue(aNullable4ByteArray), + _PigeonJniCodec.writeValue(aNullable8ByteArray), + _PigeonJniCodec.writeValue(aNullableFloatArray), + aNullableEnum == null ? null : aNullableEnum!.toJni(), + anotherNullableEnum == null ? null : anotherNullableEnum!.toJni(), + _PigeonJniCodec.writeValue(aNullableString), + _PigeonJniCodec.writeValue(aNullableObject), + allNullableTypes == null ? null : allNullableTypes!.toJni(), + _PigeonJniCodec.writeValue?>(list), + _PigeonJniCodec.writeValue?>(stringList), + _PigeonJniCodec.writeValue?>(intList), + _PigeonJniCodec.writeValue?>(doubleList), + _PigeonJniCodec.writeValue?>(boolList), + _PigeonJniCodec.writeValue?>(enumList), + _PigeonJniCodec.writeValue?>(objectList), + _PigeonJniCodec.writeValue?>?>(listList), + _PigeonJniCodec.writeValue?>?>(mapList), + _PigeonJniCodec.writeValue?>( + recursiveClassList, + ), + _PigeonJniCodec.writeValue?>(map), + _PigeonJniCodec.writeValue?>(stringMap), + _PigeonJniCodec.writeValue?>(intMap), + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + _PigeonJniCodec.writeValue?>(objectMap), + _PigeonJniCodec.writeValue?>?>(listMap), + _PigeonJniCodec.writeValue?>?>( + mapMap, + ), + _PigeonJniCodec.writeValue?>( + recursiveClassMap, + ), + ); + } + + ffi_bridge.NIAllNullableTypesBridge toFfi() { + return ffi_bridge.NIAllNullableTypesBridge.alloc().initWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableInt64: _PigeonFfiCodec.writeValue(aNullableInt64), + aNullableDouble: _PigeonFfiCodec.writeValue(aNullableDouble), + aNullableByteArray: + _PigeonFfiCodec.writeValue( + aNullableByteArray, + ), + aNullable4ByteArray: + _PigeonFfiCodec.writeValue( + aNullable4ByteArray, + ), + aNullable8ByteArray: + _PigeonFfiCodec.writeValue( + aNullable8ByteArray, + ), + aNullableFloatArray: + _PigeonFfiCodec.writeValue( + aNullableFloatArray, + ), + aNullableEnum: _PigeonFfiCodec.writeValue( + aNullableEnum?.index, + ), + anotherNullableEnum: _PigeonFfiCodec.writeValue( + anotherNullableEnum?.index, + ), + aNullableString: _PigeonFfiCodec.writeValue(aNullableString), + aNullableObject: _PigeonFfiCodec.writeValue( + aNullableObject, + generic: true, + ), + allNullableTypes: allNullableTypes == null + ? null + : allNullableTypes!.toFfi(), + list: _PigeonFfiCodec.writeValue(list), + stringList: _PigeonFfiCodec.writeValue(stringList), + intList: _PigeonFfiCodec.writeValue(intList), + doubleList: _PigeonFfiCodec.writeValue(doubleList), + boolList: _PigeonFfiCodec.writeValue(boolList), + enumList: _PigeonFfiCodec.writeValue(enumList), + objectList: _PigeonFfiCodec.writeValue(objectList), + listList: _PigeonFfiCodec.writeValue(listList), + mapList: _PigeonFfiCodec.writeValue(mapList), + recursiveClassList: _PigeonFfiCodec.writeValue( + recursiveClassList, + ), + map: _PigeonFfiCodec.writeValue(map), + stringMap: _PigeonFfiCodec.writeValue(stringMap), + intMap: _PigeonFfiCodec.writeValue(intMap), + enumMap: _PigeonFfiCodec.writeValue(enumMap), + objectMap: _PigeonFfiCodec.writeValue(objectMap), + listMap: _PigeonFfiCodec.writeValue(listMap), + mapMap: _PigeonFfiCodec.writeValue(mapMap), + recursiveClassMap: _PigeonFfiCodec.writeValue( + recursiveClassMap, + ), + ); + } + + Object encode() { + return _toList(); + } + + static NIAllNullableTypes? fromJni(jni_bridge.NIAllNullableTypes? jniClass) { + return jniClass == null + ? null + : NIAllNullableTypes( + aNullableBool: jniClass.aNullableBool?.toDartBool( + releaseOriginal: true, + ), + aNullableInt: jniClass.aNullableInt?.toDartInt( + releaseOriginal: true, + ), + aNullableInt64: jniClass.aNullableInt64?.toDartInt( + releaseOriginal: true, + ), + aNullableDouble: jniClass.aNullableDouble?.toDartDouble( + releaseOriginal: true, + ), + aNullableByteArray: + (_PigeonJniCodec.readValue(jniClass.aNullableByteArray) + as Uint8List?), + aNullable4ByteArray: + (_PigeonJniCodec.readValue(jniClass.aNullable4ByteArray) + as Int32List?), + aNullable8ByteArray: + (_PigeonJniCodec.readValue(jniClass.aNullable8ByteArray) + as Int64List?), + aNullableFloatArray: + (_PigeonJniCodec.readValue(jniClass.aNullableFloatArray) + as Float64List?), + aNullableEnum: NIAnEnum.fromJni(jniClass.aNullableEnum), + anotherNullableEnum: NIAnotherEnum.fromJni( + jniClass.anotherNullableEnum, + ), + aNullableString: jniClass.aNullableString?.toDartString( + releaseOriginal: true, + ), + aNullableObject: _PigeonJniCodec.readValue( + jniClass.aNullableObject, + ), + allNullableTypes: NIAllNullableTypes.fromJni( + jniClass.allNullableTypes, + ), + list: (_PigeonJniCodec.readValue(jniClass.list) as List?) + ?.cast(), + stringList: + (_PigeonJniCodec.readValue(jniClass.stringList) + as List?) + ?.cast(), + intList: + (_PigeonJniCodec.readValue(jniClass.intList) as List?) + ?.cast(), + doubleList: + (_PigeonJniCodec.readValue(jniClass.doubleList) + as List?) + ?.cast(), + boolList: + (_PigeonJniCodec.readValue(jniClass.boolList) as List?) + ?.cast(), + enumList: + (_PigeonJniCodec.readValue(jniClass.enumList) as List?) + ?.cast(), + objectList: + (_PigeonJniCodec.readValue(jniClass.objectList) + as List?) + ?.cast(), + listList: + (_PigeonJniCodec.readValue(jniClass.listList) as List?) + ?.cast?>(), + mapList: + (_PigeonJniCodec.readValue(jniClass.mapList) as List?) + ?.cast?>(), + recursiveClassList: + (_PigeonJniCodec.readValue(jniClass.recursiveClassList) + as List?) + ?.cast(), + map: + (_PigeonJniCodec.readValue(jniClass.map) + as Map?) + ?.cast(), + stringMap: + (_PigeonJniCodec.readValue(jniClass.stringMap) + as Map?) + ?.cast(), + intMap: + (_PigeonJniCodec.readValue(jniClass.intMap) + as Map?) + ?.cast(), + enumMap: + (_PigeonJniCodec.readValue(jniClass.enumMap) + as Map?) + ?.cast(), + objectMap: + (_PigeonJniCodec.readValue(jniClass.objectMap) + as Map?) + ?.cast(), + listMap: + (_PigeonJniCodec.readValue(jniClass.listMap) + as Map?) + ?.cast?>(), + mapMap: + (_PigeonJniCodec.readValue(jniClass.mapMap) + as Map?) + ?.cast?>(), + recursiveClassMap: + (_PigeonJniCodec.readValue(jniClass.recursiveClassMap) + as Map?) + ?.cast(), + ); + } + + static NIAllNullableTypes? fromFfi( + ffi_bridge.NIAllNullableTypesBridge? ffiClass, + ) { + return ffiClass == null + ? null + : NIAllNullableTypes( + aNullableBool: ffiClass.aNullableBool?.boolValue, + aNullableInt: ffiClass.aNullableInt?.longValue, + aNullableInt64: ffiClass.aNullableInt64?.longValue, + aNullableDouble: ffiClass.aNullableDouble?.doubleValue, + aNullableByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullableByteArray) + as Uint8List?), + aNullable4ByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullable4ByteArray) + as Int32List?), + aNullable8ByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullable8ByteArray) + as Int64List?), + aNullableFloatArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullableFloatArray) + as Float64List?), + aNullableEnum: ffiClass.aNullableEnum == null + ? null + : NIAnEnum.values[ffiClass.aNullableEnum!.longValue], + anotherNullableEnum: ffiClass.anotherNullableEnum == null + ? null + : NIAnotherEnum.values[ffiClass.anotherNullableEnum!.longValue], + aNullableString: ffiClass.aNullableString?.toDartString(), + aNullableObject: _PigeonFfiCodec.readValue( + ffiClass.aNullableObject, + ), + allNullableTypes: NIAllNullableTypes.fromFfi( + ffiClass.allNullableTypes, + ), + list: (_PigeonFfiCodec.readValue(ffiClass.list) as List?) + ?.cast(), + stringList: + (_PigeonFfiCodec.readValue(ffiClass.stringList) + as List?) + ?.cast(), + intList: + (_PigeonFfiCodec.readValue(ffiClass.intList, int) + as List?) + ?.cast(), + doubleList: + (_PigeonFfiCodec.readValue(ffiClass.doubleList, double) + as List?) + ?.cast(), + boolList: + (_PigeonFfiCodec.readValue(ffiClass.boolList, bool) + as List?) + ?.cast(), + enumList: + (_PigeonFfiCodec.readValue(ffiClass.enumList, NIAnEnum) + as List?) + ?.cast(), + objectList: + (_PigeonFfiCodec.readValue(ffiClass.objectList) + as List?) + ?.cast(), + listList: + (_PigeonFfiCodec.readValue(ffiClass.listList) as List?) + ?.cast?>(), + mapList: + (_PigeonFfiCodec.readValue(ffiClass.mapList) as List?) + ?.cast?>(), + recursiveClassList: + (_PigeonFfiCodec.readValue(ffiClass.recursiveClassList) + as List?) + ?.cast(), + map: + (_PigeonFfiCodec.readValue(ffiClass.map) + as Map?) + ?.cast(), + stringMap: + (_PigeonFfiCodec.readValue(ffiClass.stringMap) + as Map?) + ?.cast(), + intMap: + (_PigeonFfiCodec.readValue(ffiClass.intMap, int, int) + as Map?) + ?.cast(), + enumMap: + (_PigeonFfiCodec.readValue(ffiClass.enumMap, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + objectMap: + (_PigeonFfiCodec.readValue(ffiClass.objectMap) + as Map?) + ?.cast(), + listMap: + (_PigeonFfiCodec.readValue(ffiClass.listMap, int) + as Map?) + ?.cast?>(), + mapMap: + (_PigeonFfiCodec.readValue(ffiClass.mapMap, int) + as Map?) + ?.cast?>(), + recursiveClassMap: + (_PigeonFfiCodec.readValue(ffiClass.recursiveClassMap, int) + as Map?) + ?.cast(), + ); + } + + static NIAllNullableTypes decode(Object result) { + result as List; + return NIAllNullableTypes( + aNullableBool: result[0] as bool?, + aNullableInt: result[1] as int?, + aNullableInt64: result[2] as int?, + aNullableDouble: result[3] as double?, + aNullableByteArray: result[4] as Uint8List?, + aNullable4ByteArray: result[5] as Int32List?, + aNullable8ByteArray: result[6] as Int64List?, + aNullableFloatArray: result[7] as Float64List?, + aNullableEnum: result[8] as NIAnEnum?, + anotherNullableEnum: result[9] as NIAnotherEnum?, + aNullableString: result[10] as String?, + aNullableObject: result[11], + allNullableTypes: result[12] as NIAllNullableTypes?, + list: result[13] as List?, + stringList: (result[14] as List?)?.cast(), + intList: (result[15] as List?)?.cast(), + doubleList: (result[16] as List?)?.cast(), + boolList: (result[17] as List?)?.cast(), + enumList: (result[18] as List?)?.cast(), + objectList: result[19] as List?, + listList: (result[20] as List?)?.cast?>(), + mapList: (result[21] as List?)?.cast?>(), + recursiveClassList: (result[22] as List?) + ?.cast(), + map: result[23] as Map?, + stringMap: (result[24] as Map?) + ?.cast(), + intMap: (result[25] as Map?)?.cast(), + enumMap: (result[26] as Map?) + ?.cast(), + objectMap: result[27] as Map?, + listMap: (result[28] as Map?) + ?.cast?>(), + mapMap: (result[29] as Map?) + ?.cast?>(), + recursiveClassMap: (result[30] as Map?) + ?.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! NIAllNullableTypes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(aNullableBool, other.aNullableBool) && + _deepEquals(aNullableInt, other.aNullableInt) && + _deepEquals(aNullableInt64, other.aNullableInt64) && + _deepEquals(aNullableDouble, other.aNullableDouble) && + _deepEquals(aNullableByteArray, other.aNullableByteArray) && + _deepEquals(aNullable4ByteArray, other.aNullable4ByteArray) && + _deepEquals(aNullable8ByteArray, other.aNullable8ByteArray) && + _deepEquals(aNullableFloatArray, other.aNullableFloatArray) && + _deepEquals(aNullableEnum, other.aNullableEnum) && + _deepEquals(anotherNullableEnum, other.anotherNullableEnum) && + _deepEquals(aNullableString, other.aNullableString) && + _deepEquals(aNullableObject, other.aNullableObject) && + _deepEquals(allNullableTypes, other.allNullableTypes) && + _deepEquals(list, other.list) && + _deepEquals(stringList, other.stringList) && + _deepEquals(intList, other.intList) && + _deepEquals(doubleList, other.doubleList) && + _deepEquals(boolList, other.boolList) && + _deepEquals(enumList, other.enumList) && + _deepEquals(objectList, other.objectList) && + _deepEquals(listList, other.listList) && + _deepEquals(mapList, other.mapList) && + _deepEquals(recursiveClassList, other.recursiveClassList) && + _deepEquals(map, other.map) && + _deepEquals(stringMap, other.stringMap) && + _deepEquals(intMap, other.intMap) && + _deepEquals(enumMap, other.enumMap) && + _deepEquals(objectMap, other.objectMap) && + _deepEquals(listMap, other.listMap) && + _deepEquals(mapMap, other.mapMap) && + _deepEquals(recursiveClassMap, other.recursiveClassMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NIAllNullableTypes] class is being used to +/// test Swift classes. +class NIAllNullableTypesWithoutRecursion { + NIAllNullableTypesWithoutRecursion({ + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + }); + + bool? aNullableBool; + + int? aNullableInt; + + int? aNullableInt64; + + double? aNullableDouble; + + Uint8List? aNullableByteArray; + + Int32List? aNullable4ByteArray; + + Int64List? aNullable8ByteArray; + + Float64List? aNullableFloatArray; + + NIAnEnum? aNullableEnum; + + NIAnotherEnum? anotherNullableEnum; + + String? aNullableString; + + Object? aNullableObject; + + List? list; + + List? stringList; + + List? intList; + + List? doubleList; + + List? boolList; + + List? enumList; + + List? objectList; + + List?>? listList; + + List?>? mapList; + + Map? map; + + Map? stringMap; + + Map? intMap; + + Map? enumMap; + + Map? objectMap; + + Map?>? listMap; + + Map?>? mapMap; + + List _toList() { + return [ + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ]; + } + + jni_bridge.NIAllNullableTypesWithoutRecursion toJni() { + return jni_bridge.NIAllNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableInt64), + _PigeonJniCodec.writeValue(aNullableDouble), + _PigeonJniCodec.writeValue(aNullableByteArray), + _PigeonJniCodec.writeValue(aNullable4ByteArray), + _PigeonJniCodec.writeValue(aNullable8ByteArray), + _PigeonJniCodec.writeValue(aNullableFloatArray), + aNullableEnum == null ? null : aNullableEnum!.toJni(), + anotherNullableEnum == null ? null : anotherNullableEnum!.toJni(), + _PigeonJniCodec.writeValue(aNullableString), + _PigeonJniCodec.writeValue(aNullableObject), + _PigeonJniCodec.writeValue?>(list), + _PigeonJniCodec.writeValue?>(stringList), + _PigeonJniCodec.writeValue?>(intList), + _PigeonJniCodec.writeValue?>(doubleList), + _PigeonJniCodec.writeValue?>(boolList), + _PigeonJniCodec.writeValue?>(enumList), + _PigeonJniCodec.writeValue?>(objectList), + _PigeonJniCodec.writeValue?>?>(listList), + _PigeonJniCodec.writeValue?>?>(mapList), + _PigeonJniCodec.writeValue?>(map), + _PigeonJniCodec.writeValue?>(stringMap), + _PigeonJniCodec.writeValue?>(intMap), + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + _PigeonJniCodec.writeValue?>(objectMap), + _PigeonJniCodec.writeValue?>?>(listMap), + _PigeonJniCodec.writeValue?>?>( + mapMap, + ), + ); + } + + ffi_bridge.NIAllNullableTypesWithoutRecursionBridge toFfi() { + return ffi_bridge.NIAllNullableTypesWithoutRecursionBridge.alloc() + .initWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableInt64: _PigeonFfiCodec.writeValue(aNullableInt64), + aNullableDouble: _PigeonFfiCodec.writeValue( + aNullableDouble, + ), + aNullableByteArray: + _PigeonFfiCodec.writeValue( + aNullableByteArray, + ), + aNullable4ByteArray: + _PigeonFfiCodec.writeValue( + aNullable4ByteArray, + ), + aNullable8ByteArray: + _PigeonFfiCodec.writeValue( + aNullable8ByteArray, + ), + aNullableFloatArray: + _PigeonFfiCodec.writeValue( + aNullableFloatArray, + ), + aNullableEnum: _PigeonFfiCodec.writeValue( + aNullableEnum?.index, + ), + anotherNullableEnum: _PigeonFfiCodec.writeValue( + anotherNullableEnum?.index, + ), + aNullableString: _PigeonFfiCodec.writeValue( + aNullableString, + ), + aNullableObject: _PigeonFfiCodec.writeValue( + aNullableObject, + generic: true, + ), + list: _PigeonFfiCodec.writeValue(list), + stringList: _PigeonFfiCodec.writeValue(stringList), + intList: _PigeonFfiCodec.writeValue(intList), + doubleList: _PigeonFfiCodec.writeValue(doubleList), + boolList: _PigeonFfiCodec.writeValue(boolList), + enumList: _PigeonFfiCodec.writeValue(enumList), + objectList: _PigeonFfiCodec.writeValue(objectList), + listList: _PigeonFfiCodec.writeValue(listList), + mapList: _PigeonFfiCodec.writeValue(mapList), + map: _PigeonFfiCodec.writeValue(map), + stringMap: _PigeonFfiCodec.writeValue(stringMap), + intMap: _PigeonFfiCodec.writeValue(intMap), + enumMap: _PigeonFfiCodec.writeValue(enumMap), + objectMap: _PigeonFfiCodec.writeValue(objectMap), + listMap: _PigeonFfiCodec.writeValue(listMap), + mapMap: _PigeonFfiCodec.writeValue(mapMap), + ); + } + + Object encode() { + return _toList(); + } + + static NIAllNullableTypesWithoutRecursion? fromJni( + jni_bridge.NIAllNullableTypesWithoutRecursion? jniClass, + ) { + return jniClass == null + ? null + : NIAllNullableTypesWithoutRecursion( + aNullableBool: jniClass.aNullableBool?.toDartBool( + releaseOriginal: true, + ), + aNullableInt: jniClass.aNullableInt?.toDartInt( + releaseOriginal: true, + ), + aNullableInt64: jniClass.aNullableInt64?.toDartInt( + releaseOriginal: true, + ), + aNullableDouble: jniClass.aNullableDouble?.toDartDouble( + releaseOriginal: true, + ), + aNullableByteArray: + (_PigeonJniCodec.readValue(jniClass.aNullableByteArray) + as Uint8List?), + aNullable4ByteArray: + (_PigeonJniCodec.readValue(jniClass.aNullable4ByteArray) + as Int32List?), + aNullable8ByteArray: + (_PigeonJniCodec.readValue(jniClass.aNullable8ByteArray) + as Int64List?), + aNullableFloatArray: + (_PigeonJniCodec.readValue(jniClass.aNullableFloatArray) + as Float64List?), + aNullableEnum: NIAnEnum.fromJni(jniClass.aNullableEnum), + anotherNullableEnum: NIAnotherEnum.fromJni( + jniClass.anotherNullableEnum, + ), + aNullableString: jniClass.aNullableString?.toDartString( + releaseOriginal: true, + ), + aNullableObject: _PigeonJniCodec.readValue( + jniClass.aNullableObject, + ), + list: (_PigeonJniCodec.readValue(jniClass.list) as List?) + ?.cast(), + stringList: + (_PigeonJniCodec.readValue(jniClass.stringList) + as List?) + ?.cast(), + intList: + (_PigeonJniCodec.readValue(jniClass.intList) as List?) + ?.cast(), + doubleList: + (_PigeonJniCodec.readValue(jniClass.doubleList) + as List?) + ?.cast(), + boolList: + (_PigeonJniCodec.readValue(jniClass.boolList) as List?) + ?.cast(), + enumList: + (_PigeonJniCodec.readValue(jniClass.enumList) as List?) + ?.cast(), + objectList: + (_PigeonJniCodec.readValue(jniClass.objectList) + as List?) + ?.cast(), + listList: + (_PigeonJniCodec.readValue(jniClass.listList) as List?) + ?.cast?>(), + mapList: + (_PigeonJniCodec.readValue(jniClass.mapList) as List?) + ?.cast?>(), + map: + (_PigeonJniCodec.readValue(jniClass.map) + as Map?) + ?.cast(), + stringMap: + (_PigeonJniCodec.readValue(jniClass.stringMap) + as Map?) + ?.cast(), + intMap: + (_PigeonJniCodec.readValue(jniClass.intMap) + as Map?) + ?.cast(), + enumMap: + (_PigeonJniCodec.readValue(jniClass.enumMap) + as Map?) + ?.cast(), + objectMap: + (_PigeonJniCodec.readValue(jniClass.objectMap) + as Map?) + ?.cast(), + listMap: + (_PigeonJniCodec.readValue(jniClass.listMap) + as Map?) + ?.cast?>(), + mapMap: + (_PigeonJniCodec.readValue(jniClass.mapMap) + as Map?) + ?.cast?>(), + ); + } + + static NIAllNullableTypesWithoutRecursion? fromFfi( + ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? ffiClass, + ) { + return ffiClass == null + ? null + : NIAllNullableTypesWithoutRecursion( + aNullableBool: ffiClass.aNullableBool?.boolValue, + aNullableInt: ffiClass.aNullableInt?.longValue, + aNullableInt64: ffiClass.aNullableInt64?.longValue, + aNullableDouble: ffiClass.aNullableDouble?.doubleValue, + aNullableByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullableByteArray) + as Uint8List?), + aNullable4ByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullable4ByteArray) + as Int32List?), + aNullable8ByteArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullable8ByteArray) + as Int64List?), + aNullableFloatArray: + (_PigeonFfiCodec.readValue(ffiClass.aNullableFloatArray) + as Float64List?), + aNullableEnum: ffiClass.aNullableEnum == null + ? null + : NIAnEnum.values[ffiClass.aNullableEnum!.longValue], + anotherNullableEnum: ffiClass.anotherNullableEnum == null + ? null + : NIAnotherEnum.values[ffiClass.anotherNullableEnum!.longValue], + aNullableString: ffiClass.aNullableString?.toDartString(), + aNullableObject: _PigeonFfiCodec.readValue( + ffiClass.aNullableObject, + ), + list: (_PigeonFfiCodec.readValue(ffiClass.list) as List?) + ?.cast(), + stringList: + (_PigeonFfiCodec.readValue(ffiClass.stringList) + as List?) + ?.cast(), + intList: + (_PigeonFfiCodec.readValue(ffiClass.intList, int) + as List?) + ?.cast(), + doubleList: + (_PigeonFfiCodec.readValue(ffiClass.doubleList, double) + as List?) + ?.cast(), + boolList: + (_PigeonFfiCodec.readValue(ffiClass.boolList, bool) + as List?) + ?.cast(), + enumList: + (_PigeonFfiCodec.readValue(ffiClass.enumList, NIAnEnum) + as List?) + ?.cast(), + objectList: + (_PigeonFfiCodec.readValue(ffiClass.objectList) + as List?) + ?.cast(), + listList: + (_PigeonFfiCodec.readValue(ffiClass.listList) as List?) + ?.cast?>(), + mapList: + (_PigeonFfiCodec.readValue(ffiClass.mapList) as List?) + ?.cast?>(), + map: + (_PigeonFfiCodec.readValue(ffiClass.map) + as Map?) + ?.cast(), + stringMap: + (_PigeonFfiCodec.readValue(ffiClass.stringMap) + as Map?) + ?.cast(), + intMap: + (_PigeonFfiCodec.readValue(ffiClass.intMap, int, int) + as Map?) + ?.cast(), + enumMap: + (_PigeonFfiCodec.readValue(ffiClass.enumMap, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + objectMap: + (_PigeonFfiCodec.readValue(ffiClass.objectMap) + as Map?) + ?.cast(), + listMap: + (_PigeonFfiCodec.readValue(ffiClass.listMap, int) + as Map?) + ?.cast?>(), + mapMap: + (_PigeonFfiCodec.readValue(ffiClass.mapMap, int) + as Map?) + ?.cast?>(), + ); + } + + static NIAllNullableTypesWithoutRecursion decode(Object result) { + result as List; + return NIAllNullableTypesWithoutRecursion( + aNullableBool: result[0] as bool?, + aNullableInt: result[1] as int?, + aNullableInt64: result[2] as int?, + aNullableDouble: result[3] as double?, + aNullableByteArray: result[4] as Uint8List?, + aNullable4ByteArray: result[5] as Int32List?, + aNullable8ByteArray: result[6] as Int64List?, + aNullableFloatArray: result[7] as Float64List?, + aNullableEnum: result[8] as NIAnEnum?, + anotherNullableEnum: result[9] as NIAnotherEnum?, + aNullableString: result[10] as String?, + aNullableObject: result[11], + list: result[12] as List?, + stringList: (result[13] as List?)?.cast(), + intList: (result[14] as List?)?.cast(), + doubleList: (result[15] as List?)?.cast(), + boolList: (result[16] as List?)?.cast(), + enumList: (result[17] as List?)?.cast(), + objectList: result[18] as List?, + listList: (result[19] as List?)?.cast?>(), + mapList: (result[20] as List?)?.cast?>(), + map: result[21] as Map?, + stringMap: (result[22] as Map?) + ?.cast(), + intMap: (result[23] as Map?)?.cast(), + enumMap: (result[24] as Map?) + ?.cast(), + objectMap: result[25] as Map?, + listMap: (result[26] as Map?) + ?.cast?>(), + mapMap: (result[27] as Map?) + ?.cast?>(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! NIAllNullableTypesWithoutRecursion || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(aNullableBool, other.aNullableBool) && + _deepEquals(aNullableInt, other.aNullableInt) && + _deepEquals(aNullableInt64, other.aNullableInt64) && + _deepEquals(aNullableDouble, other.aNullableDouble) && + _deepEquals(aNullableByteArray, other.aNullableByteArray) && + _deepEquals(aNullable4ByteArray, other.aNullable4ByteArray) && + _deepEquals(aNullable8ByteArray, other.aNullable8ByteArray) && + _deepEquals(aNullableFloatArray, other.aNullableFloatArray) && + _deepEquals(aNullableEnum, other.aNullableEnum) && + _deepEquals(anotherNullableEnum, other.anotherNullableEnum) && + _deepEquals(aNullableString, other.aNullableString) && + _deepEquals(aNullableObject, other.aNullableObject) && + _deepEquals(list, other.list) && + _deepEquals(stringList, other.stringList) && + _deepEquals(intList, other.intList) && + _deepEquals(doubleList, other.doubleList) && + _deepEquals(boolList, other.boolList) && + _deepEquals(enumList, other.enumList) && + _deepEquals(objectList, other.objectList) && + _deepEquals(listList, other.listList) && + _deepEquals(mapList, other.mapList) && + _deepEquals(map, other.map) && + _deepEquals(stringMap, other.stringMap) && + _deepEquals(intMap, other.intMap) && + _deepEquals(enumMap, other.enumMap) && + _deepEquals(objectMap, other.objectMap) && + _deepEquals(listMap, other.listMap) && + _deepEquals(mapMap, other.mapMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `NIAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NIAllTypes` when testing doesn't require both (ie. testing null classes). +class NIAllClassesWrapper { + NIAllClassesWrapper({ + required this.allNullableTypes, + this.allNullableTypesWithoutRecursion, + this.allTypes, + required this.classList, + this.nullableClassList, + required this.classMap, + this.nullableClassMap, + }); + + NIAllNullableTypes allNullableTypes; + + NIAllNullableTypesWithoutRecursion? allNullableTypesWithoutRecursion; + + NIAllTypes? allTypes; + + List classList; + + List? nullableClassList; + + Map classMap; + + Map? nullableClassMap; + + List _toList() { + return [ + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap, + ]; + } + + jni_bridge.NIAllClassesWrapper toJni() { + return jni_bridge.NIAllClassesWrapper( + allNullableTypes.toJni(), + allNullableTypesWithoutRecursion == null + ? null + : allNullableTypesWithoutRecursion!.toJni(), + allTypes == null ? null : allTypes!.toJni(), + _PigeonJniCodec.writeValue>(classList), + _PigeonJniCodec.writeValue< + JList? + >(nullableClassList), + _PigeonJniCodec.writeValue>( + classMap, + ), + _PigeonJniCodec.writeValue< + JMap? + >(nullableClassMap), + ); + } + + ffi_bridge.NIAllClassesWrapperBridge toFfi() { + return ffi_bridge.NIAllClassesWrapperBridge.alloc() + .initWithAllNullableTypes( + allNullableTypes.toFfi(), + allNullableTypesWithoutRecursion: + allNullableTypesWithoutRecursion == null + ? null + : allNullableTypesWithoutRecursion!.toFfi(), + allTypes: allTypes == null ? null : allTypes!.toFfi(), + classList: _PigeonFfiCodec.writeValue(classList), + nullableClassList: _PigeonFfiCodec.writeValue( + nullableClassList, + ), + classMap: _PigeonFfiCodec.writeValue(classMap), + nullableClassMap: _PigeonFfiCodec.writeValue( + nullableClassMap, + ), + ); + } + + Object encode() { + return _toList(); + } + + static NIAllClassesWrapper? fromJni( + jni_bridge.NIAllClassesWrapper? jniClass, + ) { + return jniClass == null + ? null + : NIAllClassesWrapper( + allNullableTypes: NIAllNullableTypes.fromJni( + jniClass.allNullableTypes, + )!, + allNullableTypesWithoutRecursion: + NIAllNullableTypesWithoutRecursion.fromJni( + jniClass.allNullableTypesWithoutRecursion, + ), + allTypes: NIAllTypes.fromJni(jniClass.allTypes), + classList: + (_PigeonJniCodec.readValue(jniClass.classList)! + as List) + .cast(), + nullableClassList: + (_PigeonJniCodec.readValue(jniClass.nullableClassList) + as List?) + ?.cast(), + classMap: + (_PigeonJniCodec.readValue(jniClass.classMap)! + as Map) + .cast(), + nullableClassMap: + (_PigeonJniCodec.readValue(jniClass.nullableClassMap) + as Map?) + ?.cast(), + ); + } + + static NIAllClassesWrapper? fromFfi( + ffi_bridge.NIAllClassesWrapperBridge? ffiClass, + ) { + return ffiClass == null + ? null + : NIAllClassesWrapper( + allNullableTypes: NIAllNullableTypes.fromFfi( + ffiClass.allNullableTypes, + )!, + allNullableTypesWithoutRecursion: + NIAllNullableTypesWithoutRecursion.fromFfi( + ffiClass.allNullableTypesWithoutRecursion, + ), + allTypes: NIAllTypes.fromFfi(ffiClass.allTypes), + classList: + (_PigeonFfiCodec.readValue(ffiClass.classList)! + as List) + .cast(), + nullableClassList: + (_PigeonFfiCodec.readValue(ffiClass.nullableClassList) + as List?) + ?.cast(), + classMap: + (_PigeonFfiCodec.readValue(ffiClass.classMap, int)! + as Map) + .cast(), + nullableClassMap: + (_PigeonFfiCodec.readValue(ffiClass.nullableClassMap, int) + as Map?) + ?.cast(), + ); + } + + static NIAllClassesWrapper decode(Object result) { + result as List; + return NIAllClassesWrapper( + allNullableTypes: result[0]! as NIAllNullableTypes, + allNullableTypesWithoutRecursion: + result[1] as NIAllNullableTypesWithoutRecursion?, + allTypes: result[2] as NIAllTypes?, + classList: (result[3]! as List).cast(), + nullableClassList: (result[4] as List?) + ?.cast(), + classMap: (result[5]! as Map).cast(), + nullableClassMap: (result[6] as Map?) + ?.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! NIAllClassesWrapper || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(allNullableTypes, other.allNullableTypes) && + _deepEquals( + allNullableTypesWithoutRecursion, + other.allNullableTypesWithoutRecursion, + ) && + _deepEquals(allTypes, other.allTypes) && + _deepEquals(classList, other.classList) && + _deepEquals(nullableClassList, other.nullableClassList) && + _deepEquals(classMap, other.classMap) && + _deepEquals(nullableClassMap, other.nullableClassMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } +} + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is NIAnEnum) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is NIAnotherEnum) { + buffer.putUint8(130); + writeValue(buffer, value.index); + } else if (value is NIUnusedClass) { + buffer.putUint8(131); + writeValue(buffer, value.encode()); + } else if (value is NIAllTypes) { + buffer.putUint8(132); + writeValue(buffer, value.encode()); + } else if (value is NIAllNullableTypes) { + buffer.putUint8(133); + writeValue(buffer, value.encode()); + } else if (value is NIAllNullableTypesWithoutRecursion) { + buffer.putUint8(134); + writeValue(buffer, value.encode()); + } else if (value is NIAllClassesWrapper) { + buffer.putUint8(135); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 129: + final value = readValue(buffer) as int?; + return value == null ? null : NIAnEnum.values[value]; + case 130: + final value = readValue(buffer) as int?; + return value == null ? null : NIAnotherEnum.values[value]; + case 131: + return NIUnusedClass.decode(readValue(buffer)!); + case 132: + return NIAllTypes.decode(readValue(buffer)!); + case 133: + return NIAllNullableTypes.decode(readValue(buffer)!); + case 134: + return NIAllNullableTypesWithoutRecursion.decode(readValue(buffer)!); + case 135: + return NIAllClassesWrapper.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +const String defaultInstanceName = + 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u'; + +class NIHostIntegrationCoreApiForNativeInterop { + NIHostIntegrationCoreApiForNativeInterop._withRegistrar({ + jni_bridge.NIHostIntegrationCoreApiRegistrar? jniApi, + ffi_bridge.NIHostIntegrationCoreApiSetup? ffiApi, + }) : _jniApi = jniApi, + _ffiApi = ffiApi; + + /// Returns instance of NIHostIntegrationCoreApiForNativeInterop with specified [channelName] if one has been registered. + static NIHostIntegrationCoreApiForNativeInterop? getInstance({ + String channelName = defaultInstanceName, + }) { + late NIHostIntegrationCoreApiForNativeInterop res; + if (Platform.isAndroid) { + final jni_bridge.NIHostIntegrationCoreApiRegistrar? link = + jni_bridge.NIHostIntegrationCoreApiRegistrar().getInstance( + channelName.toJString(), + ); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = NIHostIntegrationCoreApiForNativeInterop._withRegistrar( + jniApi: link, + ); + } else if (Platform.isIOS || Platform.isMacOS) { + final ffi_bridge.NIHostIntegrationCoreApiSetup? link = + ffi_bridge.NIHostIntegrationCoreApiSetup.getInstanceWithName( + NSString(channelName), + ); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = NIHostIntegrationCoreApiForNativeInterop._withRegistrar( + ffiApi: link, + ); + } + return res; + } + + late final jni_bridge.NIHostIntegrationCoreApiRegistrar? _jniApi; + late final ffi_bridge.NIHostIntegrationCoreApiSetup? _ffiApi; + + void noop() { + try { + if (_jniApi != null) { + return _jniApi.noop(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + _ffiApi.noopWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllTypes echoAllTypes(NIAllTypes everything) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllTypes res = _jniApi.echoAllTypes( + everything.toJni(), + ); + final NIAllTypes dartTypeRes = NIAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllTypesBridge? res = _ffiApi + .echoAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllTypes dartTypeRes = NIAllTypes.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Object? throwError() { + try { + if (_jniApi != null) { + final JObject? res = _jniApi.throwError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSObject? res = _ffiApi.throwErrorWithWrappedError(error); + _throwIfFfiError(error); + final Object? dartTypeRes = _PigeonFfiCodec.readValue(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + void throwErrorFromVoid() { + try { + if (_jniApi != null) { + return _jniApi.throwErrorFromVoid(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + _ffiApi.throwErrorFromVoidWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Object? throwFlutterError() { + try { + if (_jniApi != null) { + final JObject? res = _jniApi.throwFlutterError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSObject? res = _ffiApi.throwFlutterErrorWithWrappedError(error); + _throwIfFfiError(error); + final Object? dartTypeRes = _PigeonFfiCodec.readValue(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + int echoInt(int anInt) { + try { + if (_jniApi != null) { + return _jniApi.echoInt(anInt); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoIntWithAnInt( + anInt, + wrappedError: error, + ); + _throwIfFfiError(error); + final int dartTypeRes = res!.longValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + double echoDouble(double aDouble) { + try { + if (_jniApi != null) { + return _jniApi.echoDouble(aDouble); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoDoubleWithADouble( + aDouble, + wrappedError: error, + ); + _throwIfFfiError(error); + final double dartTypeRes = res!.doubleValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + bool echoBool(bool aBool) { + try { + if (_jniApi != null) { + return _jniApi.echoBool(aBool); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoBoolWithABool( + aBool, + wrappedError: error, + ); + _throwIfFfiError(error); + final bool dartTypeRes = res!.boolValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String echoString(String aString) { + try { + if (_jniApi != null) { + final JString res = _jniApi.echoString( + _PigeonJniCodec.writeValue(aString), + ); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi.echoStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + ); + _throwIfFfiError(error); + final String dartTypeRes = res!.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Uint8List echoUint8List(Uint8List aUint8List) { + try { + if (_jniApi != null) { + final JByteArray res = _jniApi.echoUint8List( + _PigeonJniCodec.writeValue(aUint8List), + ); + final Uint8List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoUint8ListWithAUint8List( + _PigeonFfiCodec.writeValue( + aUint8List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Uint8List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int32List echoInt32List(Int32List aInt32List) { + try { + if (_jniApi != null) { + final JIntArray res = _jniApi.echoInt32List( + _PigeonJniCodec.writeValue(aInt32List), + ); + final Int32List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int32List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoInt32ListWithAInt32List( + _PigeonFfiCodec.writeValue( + aInt32List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int32List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Int32List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int64List echoInt64List(Int64List aInt64List) { + try { + if (_jniApi != null) { + final JLongArray res = _jniApi.echoInt64List( + _PigeonJniCodec.writeValue(aInt64List), + ); + final Int64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoInt64ListWithAInt64List( + _PigeonFfiCodec.writeValue( + aInt64List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int64List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Int64List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Float64List echoFloat64List(Float64List aFloat64List) { + try { + if (_jniApi != null) { + final JDoubleArray res = _jniApi.echoFloat64List( + _PigeonJniCodec.writeValue(aFloat64List), + ); + final Float64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Float64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoFloat64ListWithAFloat64List( + _PigeonFfiCodec.writeValue( + aFloat64List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Float64List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Float64List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Object echoObject(Object anObject) { + try { + if (_jniApi != null) { + final JObject res = _jniApi.echoObject( + _PigeonJniCodec.writeValue(anObject), + ); + final Object dartTypeRes = _PigeonJniCodec.readValue(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSObject? res = _ffiApi.echoObjectWithAnObject( + _PigeonFfiCodec.writeValue(anObject, generic: true), + wrappedError: error, + ); + _throwIfFfiError(error); + final Object dartTypeRes = _PigeonFfiCodec.readValue(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoList(List list) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoList( + _PigeonJniCodec.writeValue>(list), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoStringList(List stringList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoStringList( + _PigeonJniCodec.writeValue>(stringList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoStringListWithStringList( + _PigeonFfiCodec.writeValue(stringList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoIntList(List intList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoIntList( + _PigeonJniCodec.writeValue>(intList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoIntListWithIntList( + _PigeonFfiCodec.writeValue(intList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, int)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoDoubleList(List doubleList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoDoubleList( + _PigeonJniCodec.writeValue>(doubleList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoDoubleListWithDoubleList( + _PigeonFfiCodec.writeValue(doubleList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, double)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoBoolList(List boolList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoBoolList( + _PigeonJniCodec.writeValue>(boolList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoBoolListWithBoolList( + _PigeonFfiCodec.writeValue(boolList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, bool)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoEnumList(List enumList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoClassList(List classList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoNonNullEnumList(List enumList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.echoNonNullEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List echoNonNullClassList( + List classList, + ) { + try { + if (_jniApi != null) { + final JList res = _jniApi + .echoNonNullClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNonNullClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoMap(Map map) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.echoMap( + _PigeonJniCodec.writeValue>(map), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoStringMap(Map stringMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.echoStringMap( + _PigeonJniCodec.writeValue>(stringMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoIntMap(Map intMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.echoIntMap( + _PigeonJniCodec.writeValue>(intMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoEnumMap(Map enumMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .echoEnumMap( + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum)! + as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoClassMap( + Map classMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .echoClassMap( + _PigeonJniCodec.writeValue< + JMap + >(classMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoNonNullStringMap(Map stringMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.echoNonNullStringMap( + _PigeonJniCodec.writeValue>(stringMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNonNullStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoNonNullIntMap(Map intMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.echoNonNullIntMap( + _PigeonJniCodec.writeValue>(intMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNonNullIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoNonNullEnumMap(Map enumMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .echoNonNullEnumMap( + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum)! + as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map echoNonNullClassMap( + Map classMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .echoNonNullClassMap( + _PigeonJniCodec.writeValue< + JMap + >(classMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNonNullClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllClassesWrapper echoClassWrapper(NIAllClassesWrapper wrapper) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllClassesWrapper res = _jniApi.echoClassWrapper( + wrapper.toJni(), + ); + final NIAllClassesWrapper dartTypeRes = NIAllClassesWrapper.fromJni( + res, + )!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllClassesWrapperBridge? res = _ffiApi + .echoClassWrapperWithWrapper(wrapper.toFfi(), wrappedError: error); + _throwIfFfiError(error); + final NIAllClassesWrapper dartTypeRes = NIAllClassesWrapper.fromFfi( + res, + )!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnEnum echoEnum(NIAnEnum anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum res = _jniApi.echoEnum(anEnum.toJni()); + final NIAnEnum dartTypeRes = NIAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoEnumWithAnEnum( + ffi_bridge.NIAnEnum.values[anEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnEnum dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as NIAnEnum); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnotherEnum echoAnotherEnum(NIAnotherEnum anotherEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum res = _jniApi.echoAnotherEnum( + anotherEnum.toJni(), + ); + final NIAnotherEnum dartTypeRes = NIAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoAnotherEnumWithAnotherEnum( + ffi_bridge.NIAnotherEnum.values[anotherEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnotherEnum dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnotherEnum)! as NIAnotherEnum); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String echoNamedDefaultString({String aString = 'default'}) { + try { + if (_jniApi != null) { + final JString res = _jniApi.echoNamedDefaultString( + _PigeonJniCodec.writeValue(aString), + ); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi.echoNamedDefaultStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + ); + _throwIfFfiError(error); + final String dartTypeRes = res!.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + double echoOptionalDefaultDouble([double aDouble = 3.14]) { + try { + if (_jniApi != null) { + return _jniApi.echoOptionalDefaultDouble(aDouble); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoOptionalDefaultDoubleWithADouble( + aDouble, + wrappedError: error, + ); + _throwIfFfiError(error); + final double dartTypeRes = res!.doubleValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + int echoRequiredInt({required int anInt}) { + try { + if (_jniApi != null) { + return _jniApi.echoRequiredInt(anInt); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoRequiredIntWithAnInt( + anInt, + wrappedError: error, + ); + _throwIfFfiError(error); + final int dartTypeRes = res!.longValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypes? echoAllNullableTypes(NIAllNullableTypes? everything) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypes? res = _jniApi.echoAllNullableTypes( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypes? dartTypeRes = NIAllNullableTypes.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesBridge? res = _ffiApi + .echoAllNullableTypesWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypes? dartTypeRes = NIAllNullableTypes.fromFfi(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypesWithoutRecursion? res = _jniApi + .echoAllNullableTypesWithoutRecursion( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypesWithoutRecursion? dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .echoAllNullableTypesWithoutRecursionWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypesWithoutRecursion? dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromFfi(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String? extractNestedNullableString(NIAllClassesWrapper wrapper) { + try { + if (_jniApi != null) { + final JString? res = _jniApi.extractNestedNullableString( + wrapper.toJni(), + ); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi.extractNestedNullableStringWithWrapper( + wrapper.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final String? dartTypeRes = res?.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllClassesWrapper createNestedNullableString(String? nullableString) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllClassesWrapper res = _jniApi + .createNestedNullableString( + _PigeonJniCodec.writeValue(nullableString), + ); + final NIAllClassesWrapper dartTypeRes = NIAllClassesWrapper.fromJni( + res, + )!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllClassesWrapperBridge? res = _ffiApi + .createNestedNullableStringWithNullableString( + _PigeonFfiCodec.writeValue(nullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllClassesWrapper dartTypeRes = NIAllClassesWrapper.fromFfi( + res, + )!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypes res = _jniApi + .sendMultipleNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NIAllNullableTypes dartTypeRes = NIAllNullableTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesBridge? res = _ffiApi + .sendMultipleNullableTypesWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue( + aNullableString, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypes dartTypeRes = NIAllNullableTypes.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypesWithoutRecursion res = _jniApi + .sendMultipleNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NIAllNullableTypesWithoutRecursion dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .sendMultipleNullableTypesWithoutRecursionWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue( + aNullableString, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypesWithoutRecursion dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + int? echoNullableInt(int? aNullableInt) { + try { + if (_jniApi != null) { + final JLong? res = _jniApi.echoNullableInt( + _PigeonJniCodec.writeValue(aNullableInt), + ); + final int? dartTypeRes = res?.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoNullableIntWithANullableInt( + _PigeonFfiCodec.writeValue(aNullableInt), + wrappedError: error, + ); + _throwIfFfiError(error); + final int? dartTypeRes = res?.longValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + double? echoNullableDouble(double? aNullableDouble) { + try { + if (_jniApi != null) { + final JDouble? res = _jniApi.echoNullableDouble( + _PigeonJniCodec.writeValue(aNullableDouble), + ); + final double? dartTypeRes = res?.toDartDouble(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoNullableDoubleWithANullableDouble( + _PigeonFfiCodec.writeValue(aNullableDouble), + wrappedError: error, + ); + _throwIfFfiError(error); + final double? dartTypeRes = res?.doubleValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + bool? echoNullableBool(bool? aNullableBool) { + try { + if (_jniApi != null) { + final JBoolean? res = _jniApi.echoNullableBool( + _PigeonJniCodec.writeValue(aNullableBool), + ); + final bool? dartTypeRes = res?.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoNullableBoolWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + wrappedError: error, + ); + _throwIfFfiError(error); + final bool? dartTypeRes = res?.boolValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String? echoNullableString(String? aNullableString) { + try { + if (_jniApi != null) { + final JString? res = _jniApi.echoNullableString( + _PigeonJniCodec.writeValue(aNullableString), + ); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi.echoNullableStringWithANullableString( + _PigeonFfiCodec.writeValue(aNullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final String? dartTypeRes = res?.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Uint8List? echoNullableUint8List(Uint8List? aNullableUint8List) { + try { + if (_jniApi != null) { + final JByteArray? res = _jniApi.echoNullableUint8List( + _PigeonJniCodec.writeValue(aNullableUint8List), + ); + final Uint8List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoNullableUint8ListWithANullableUint8List( + _PigeonFfiCodec.writeValue( + aNullableUint8List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Uint8List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int32List? echoNullableInt32List(Int32List? aNullableInt32List) { + try { + if (_jniApi != null) { + final JIntArray? res = _jniApi.echoNullableInt32List( + _PigeonJniCodec.writeValue(aNullableInt32List), + ); + final Int32List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int32List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoNullableInt32ListWithANullableInt32List( + _PigeonFfiCodec.writeValue( + aNullableInt32List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int32List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Int32List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int64List? echoNullableInt64List(Int64List? aNullableInt64List) { + try { + if (_jniApi != null) { + final JLongArray? res = _jniApi.echoNullableInt64List( + _PigeonJniCodec.writeValue(aNullableInt64List), + ); + final Int64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoNullableInt64ListWithANullableInt64List( + _PigeonFfiCodec.writeValue( + aNullableInt64List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int64List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Int64List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Float64List? echoNullableFloat64List(Float64List? aNullableFloat64List) { + try { + if (_jniApi != null) { + final JDoubleArray? res = _jniApi.echoNullableFloat64List( + _PigeonJniCodec.writeValue(aNullableFloat64List), + ); + final Float64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Float64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .echoNullableFloat64ListWithANullableFloat64List( + _PigeonFfiCodec.writeValue( + aNullableFloat64List, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Float64List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Float64List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Object? echoNullableObject(Object? aNullableObject) { + try { + if (_jniApi != null) { + final JObject? res = _jniApi.echoNullableObject( + _PigeonJniCodec.writeValue(aNullableObject), + ); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSObject? res = _ffiApi.echoNullableObjectWithANullableObject( + _PigeonFfiCodec.writeValue(aNullableObject, generic: true), + wrappedError: error, + ); + _throwIfFfiError(error); + final Object? dartTypeRes = _PigeonFfiCodec.readValue(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? echoNullableList(List? aNullableList) { + try { + if (_jniApi != null) { + final JList? res = _jniApi.echoNullableList( + _PigeonJniCodec.writeValue?>(aNullableList), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNullableListWithANullableList( + _PigeonFfiCodec.writeValue(aNullableList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? echoNullableEnumList(List? enumList) { + try { + if (_jniApi != null) { + final JList? res = _jniApi.echoNullableEnumList( + _PigeonJniCodec.writeValue?>(enumList), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNullableEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? echoNullableClassList( + List? classList, + ) { + try { + if (_jniApi != null) { + final JList? + res = _jniApi.echoNullableClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNullableClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? echoNullableNonNullEnumList(List? enumList) { + try { + if (_jniApi != null) { + final JList? res = _jniApi + .echoNullableNonNullEnumList( + _PigeonJniCodec.writeValue?>(enumList), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNullableNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? echoNullableNonNullClassList( + List? classList, + ) { + try { + if (_jniApi != null) { + final JList? res = _jniApi + .echoNullableNonNullClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.echoNullableNonNullClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableMap(Map? map) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi.echoNullableMap( + _PigeonJniCodec.writeValue?>(map), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableStringMap( + Map? stringMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi.echoNullableStringMap( + _PigeonJniCodec.writeValue?>(stringMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableIntMap(Map? intMap) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi.echoNullableIntMap( + _PigeonJniCodec.writeValue?>(intMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableEnumMap( + Map? enumMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .echoNullableEnumMap( + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableClassMap( + Map? classMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .echoNullableClassMap( + _PigeonJniCodec.writeValue< + JMap? + >(classMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableNonNullStringMap( + Map? stringMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .echoNullableNonNullStringMap( + _PigeonJniCodec.writeValue?>(stringMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .echoNullableNonNullStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableNonNullIntMap(Map? intMap) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi.echoNullableNonNullIntMap( + _PigeonJniCodec.writeValue?>(intMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableNonNullIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableNonNullEnumMap( + Map? enumMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .echoNullableNonNullEnumMap( + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.echoNullableNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? echoNullableNonNullClassMap( + Map? classMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .echoNullableNonNullClassMap( + _PigeonJniCodec.writeValue< + JMap? + >(classMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .echoNullableNonNullClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnEnum? echoNullableEnum(NIAnEnum? anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum? res = _jniApi.echoNullableEnum( + anEnum == null ? null : anEnum.toJni(), + ); + final NIAnEnum? dartTypeRes = NIAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoNullableEnumWithAnEnum( + _PigeonFfiCodec.writeValue(anEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnEnum? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum) as NIAnEnum?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? anotherEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum? res = _jniApi.echoAnotherNullableEnum( + anotherEnum == null ? null : anotherEnum.toJni(), + ); + final NIAnotherEnum? dartTypeRes = NIAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoAnotherNullableEnumWithAnotherEnum( + _PigeonFfiCodec.writeValue(anotherEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnotherEnum? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnotherEnum) as NIAnotherEnum?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + int? echoOptionalNullableInt([int? aNullableInt]) { + try { + if (_jniApi != null) { + final JLong? res = _jniApi.echoOptionalNullableInt( + _PigeonJniCodec.writeValue(aNullableInt), + ); + final int? dartTypeRes = res?.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.echoOptionalNullableIntWithANullableInt( + _PigeonFfiCodec.writeValue(aNullableInt), + wrappedError: error, + ); + _throwIfFfiError(error); + final int? dartTypeRes = res?.longValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String? echoNamedNullableString({String? aNullableString}) { + try { + if (_jniApi != null) { + final JString? res = _jniApi.echoNamedNullableString( + _PigeonJniCodec.writeValue(aNullableString), + ); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi + .echoNamedNullableStringWithANullableString( + _PigeonFfiCodec.writeValue(aNullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final String? dartTypeRes = res?.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future noopAsync() async { + try { + if (_jniApi != null) { + await _jniApi.noopAsync(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.noopAsyncWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid.listener(() { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncInt(int anInt) async { + try { + if (_jniApi != null) { + final JLong res = await _jniApi.echoAsyncInt(anInt); + final int dartTypeRes = res.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncIntWithAnInt( + anInt, + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.longValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncDouble(double aDouble) async { + try { + if (_jniApi != null) { + final JDouble res = await _jniApi.echoAsyncDouble(aDouble); + final double dartTypeRes = res.toDartDouble(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncDoubleWithADouble( + aDouble, + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.doubleValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncBool(bool aBool) async { + try { + if (_jniApi != null) { + final JBoolean res = await _jniApi.echoAsyncBool(aBool); + final bool dartTypeRes = res.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncBoolWithABool( + aBool, + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.boolValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncString(String aString) async { + try { + if (_jniApi != null) { + final JString res = await _jniApi.echoAsyncString( + _PigeonJniCodec.writeValue(aString), + ); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSString.listener(( + NSString? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.toDartString()); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncUint8List(Uint8List aUint8List) async { + try { + if (_jniApi != null) { + final JByteArray res = await _jniApi.echoAsyncUint8List( + _PigeonJniCodec.writeValue(aUint8List), + ); + final Uint8List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncUint8ListWithAUint8List( + _PigeonFfiCodec.writeValue( + aUint8List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Uint8List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncInt32List(Int32List aInt32List) async { + try { + if (_jniApi != null) { + final JIntArray res = await _jniApi.echoAsyncInt32List( + _PigeonJniCodec.writeValue(aInt32List), + ); + final Int32List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int32List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncInt32ListWithAInt32List( + _PigeonFfiCodec.writeValue( + aInt32List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Int32List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncInt64List(Int64List aInt64List) async { + try { + if (_jniApi != null) { + final JLongArray res = await _jniApi.echoAsyncInt64List( + _PigeonJniCodec.writeValue(aInt64List), + ); + final Int64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncInt64ListWithAInt64List( + _PigeonFfiCodec.writeValue( + aInt64List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Int64List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncFloat64List(Float64List aFloat64List) async { + try { + if (_jniApi != null) { + final JDoubleArray res = await _jniApi.echoAsyncFloat64List( + _PigeonJniCodec.writeValue(aFloat64List), + ); + final Float64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Float64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncFloat64ListWithAFloat64List( + _PigeonFfiCodec.writeValue( + aFloat64List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Float64List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncObject(Object anObject) async { + try { + if (_jniApi != null) { + final JObject res = await _jniApi.echoAsyncObject( + _PigeonJniCodec.writeValue(anObject), + ); + final Object dartTypeRes = _PigeonJniCodec.readValue(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncObjectWithAnObject( + _PigeonFfiCodec.writeValue(anObject, generic: true), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)!); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncList(List list) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi.echoAsyncList( + _PigeonJniCodec.writeValue>(list), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = Completer>(); + _ffiApi.echoAsyncListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncEnumList(List enumList) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi.echoAsyncEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncClassList( + List classList, + ) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi + .echoAsyncClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncMap(Map map) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi.echoAsyncMap( + _PigeonJniCodec.writeValue>(map), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncStringMap( + Map stringMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi.echoAsyncStringMap( + _PigeonJniCodec.writeValue>(stringMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncIntMap(Map intMap) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi.echoAsyncIntMap( + _PigeonJniCodec.writeValue>(intMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int, int)! + as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncEnumMap( + Map enumMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = + await _jniApi.echoAsyncEnumMap( + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum)! + as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> echoAsyncClassMap( + Map classMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi + .echoAsyncClassMap( + _PigeonJniCodec.writeValue< + JMap + >(classMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.echoAsyncClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int)! + as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncEnum(NIAnEnum anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum res = await _jniApi.echoAsyncEnum( + anEnum.toJni(), + ); + final NIAnEnum dartTypeRes = NIAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncEnumWithAnEnum( + ffi_bridge.NIAnEnum.values[anEnum.index], + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as NIAnEnum), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAnotherAsyncEnum(NIAnotherEnum anotherEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum res = await _jniApi.echoAnotherAsyncEnum( + anotherEnum.toJni(), + ); + final NIAnotherEnum dartTypeRes = NIAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAnotherAsyncEnumWithAnotherEnum( + ffi_bridge.NIAnotherEnum.values[anotherEnum.index], + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnotherEnum)! + as NIAnotherEnum), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future throwAsyncError() async { + try { + if (_jniApi != null) { + final JObject? res = await _jniApi.throwAsyncError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.throwAsyncErrorWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future throwAsyncErrorFromVoid() async { + try { + if (_jniApi != null) { + await _jniApi.throwAsyncErrorFromVoid(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.throwAsyncErrorFromVoidWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid.listener(() { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future throwAsyncFlutterError() async { + try { + if (_jniApi != null) { + final JObject? res = await _jniApi.throwAsyncFlutterError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.throwAsyncFlutterErrorWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNIAllTypes(NIAllTypes everything) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAllTypes res = await _jniApi.echoAsyncNIAllTypes( + everything.toJni(), + ); + final NIAllTypes dartTypeRes = NIAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNIAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NIAllTypesBridge.listener(( + ffi_bridge.NIAllTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NIAllTypes.fromFfi(res)!); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypes? res = await _jniApi + .echoAsyncNullableNIAllNullableTypes( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypes? dartTypeRes = NIAllNullableTypes.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = + Completer(); + _ffiApi.echoAsyncNullableNIAllNullableTypesWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesBridge.listener(( + ffi_bridge.NIAllNullableTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NIAllNullableTypes.fromFfi(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypesWithoutRecursion? res = await _jniApi + .echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypesWithoutRecursion? dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = + Completer(); + _ffiApi.echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge + .ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge.listener( + (ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + NIAllNullableTypesWithoutRecursion.fromFfi(res), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableInt(int? anInt) async { + try { + if (_jniApi != null) { + final JLong? res = await _jniApi.echoAsyncNullableInt( + _PigeonJniCodec.writeValue(anInt), + ); + final int? dartTypeRes = res?.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableIntWithAnInt( + _PigeonFfiCodec.writeValue(anInt), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.longValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableDouble(double? aDouble) async { + try { + if (_jniApi != null) { + final JDouble? res = await _jniApi.echoAsyncNullableDouble( + _PigeonJniCodec.writeValue(aDouble), + ); + final double? dartTypeRes = res?.toDartDouble(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableDoubleWithADouble( + _PigeonFfiCodec.writeValue(aDouble), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.doubleValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableBool(bool? aBool) async { + try { + if (_jniApi != null) { + final JBoolean? res = await _jniApi.echoAsyncNullableBool( + _PigeonJniCodec.writeValue(aBool), + ); + final bool? dartTypeRes = res?.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableBoolWithABool( + _PigeonFfiCodec.writeValue(aBool), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.boolValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableString(String? aString) async { + try { + if (_jniApi != null) { + final JString? res = await _jniApi.echoAsyncNullableString( + _PigeonJniCodec.writeValue(aString), + ); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSString.listener(( + NSString? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.toDartString()); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableUint8List(Uint8List? aUint8List) async { + try { + if (_jniApi != null) { + final JByteArray? res = await _jniApi.echoAsyncNullableUint8List( + _PigeonJniCodec.writeValue(aUint8List), + ); + final Uint8List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableUint8ListWithAUint8List( + _PigeonFfiCodec.writeValue( + aUint8List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Uint8List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableInt32List(Int32List? aInt32List) async { + try { + if (_jniApi != null) { + final JIntArray? res = await _jniApi.echoAsyncNullableInt32List( + _PigeonJniCodec.writeValue(aInt32List), + ); + final Int32List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int32List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableInt32ListWithAInt32List( + _PigeonFfiCodec.writeValue( + aInt32List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Int32List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableInt64List(Int64List? aInt64List) async { + try { + if (_jniApi != null) { + final JLongArray? res = await _jniApi.echoAsyncNullableInt64List( + _PigeonJniCodec.writeValue(aInt64List), + ); + final Int64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableInt64ListWithAInt64List( + _PigeonFfiCodec.writeValue( + aInt64List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Int64List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableFloat64List( + Float64List? aFloat64List, + ) async { + try { + if (_jniApi != null) { + final JDoubleArray? res = await _jniApi.echoAsyncNullableFloat64List( + _PigeonJniCodec.writeValue(aFloat64List), + ); + final Float64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Float64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableFloat64ListWithAFloat64List( + _PigeonFfiCodec.writeValue( + aFloat64List, + ), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Float64List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableObject(Object? anObject) async { + try { + if (_jniApi != null) { + final JObject? res = await _jniApi.echoAsyncNullableObject( + _PigeonJniCodec.writeValue(anObject), + ); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableObjectWithAnObject( + _PigeonFfiCodec.writeValue(anObject, generic: true), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableList(List? list) async { + try { + if (_jniApi != null) { + final JList? res = await _jniApi.echoAsyncNullableList( + _PigeonJniCodec.writeValue?>(list), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = Completer?>(); + _ffiApi.echoAsyncNullableListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableEnumList( + List? enumList, + ) async { + try { + if (_jniApi != null) { + final JList? res = await _jniApi + .echoAsyncNullableEnumList( + _PigeonJniCodec.writeValue?>( + enumList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableClassList( + List? classList, + ) async { + try { + if (_jniApi != null) { + final JList? + res = await _jniApi.echoAsyncNullableClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableMap( + Map? map, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .echoAsyncNullableMap( + _PigeonJniCodec.writeValue?>(map), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableStringMap( + Map? stringMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .echoAsyncNullableStringMap( + _PigeonJniCodec.writeValue?>(stringMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableIntMap( + Map? intMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi.echoAsyncNullableIntMap( + _PigeonJniCodec.writeValue?>(intMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int, int) + as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableEnumMap( + Map? enumMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = + await _jniApi.echoAsyncNullableEnumMap( + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> echoAsyncNullableClassMap( + Map? classMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .echoAsyncNullableClassMap( + _PigeonJniCodec.writeValue< + JMap? + >(classMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.echoAsyncNullableClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int) + as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableEnum(NIAnEnum? anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum? res = await _jniApi.echoAsyncNullableEnum( + anEnum == null ? null : anEnum.toJni(), + ); + final NIAnEnum? dartTypeRes = NIAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableEnumWithAnEnum( + _PigeonFfiCodec.writeValue(anEnum), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum) as NIAnEnum?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum? res = await _jniApi + .echoAnotherAsyncNullableEnum( + anotherEnum == null ? null : anotherEnum.toJni(), + ); + final NIAnotherEnum? dartTypeRes = NIAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAnotherAsyncNullableEnumWithAnotherEnum( + _PigeonFfiCodec.writeValue(anotherEnum), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnotherEnum) + as NIAnotherEnum?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + void callFlutterNoop() { + try { + if (_jniApi != null) { + return _jniApi.callFlutterNoop(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + _ffiApi.callFlutterNoopWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Object? callFlutterThrowError() { + try { + if (_jniApi != null) { + final JObject? res = _jniApi.callFlutterThrowError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSObject? res = _ffiApi.callFlutterThrowErrorWithWrappedError( + error, + ); + _throwIfFfiError(error); + final Object? dartTypeRes = _PigeonFfiCodec.readValue(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + void callFlutterThrowErrorFromVoid() { + try { + if (_jniApi != null) { + return _jniApi.callFlutterThrowErrorFromVoid(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + _ffiApi.callFlutterThrowErrorFromVoidWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllTypes callFlutterEchoNIAllTypes(NIAllTypes everything) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllTypes res = _jniApi.callFlutterEchoNIAllTypes( + everything.toJni(), + ); + final NIAllTypes dartTypeRes = NIAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllTypesBridge? res = _ffiApi + .callFlutterEchoNIAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllTypes dartTypeRes = NIAllTypes.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypes? callFlutterEchoNIAllNullableTypes( + NIAllNullableTypes? everything, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypes? res = _jniApi + .callFlutterEchoNIAllNullableTypes( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypes? dartTypeRes = NIAllNullableTypes.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesBridge? res = _ffiApi + .callFlutterEchoNIAllNullableTypesWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypes? dartTypeRes = NIAllNullableTypes.fromFfi(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypes callFlutterSendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypes res = _jniApi + .callFlutterSendMultipleNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NIAllNullableTypes dartTypeRes = NIAllNullableTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesBridge? res = _ffiApi + .callFlutterSendMultipleNullableTypesWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue( + aNullableString, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypes dartTypeRes = NIAllNullableTypes.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypesWithoutRecursion? + callFlutterEchoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypesWithoutRecursion? res = _jniApi + .callFlutterEchoNIAllNullableTypesWithoutRecursion( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypesWithoutRecursion? dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypesWithoutRecursion? dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromFfi(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAllNullableTypesWithoutRecursion + callFlutterSendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypesWithoutRecursion res = _jniApi + .callFlutterSendMultipleNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NIAllNullableTypesWithoutRecursion dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue( + aNullableString, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAllNullableTypesWithoutRecursion dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + bool callFlutterEchoBool(bool aBool) { + try { + if (_jniApi != null) { + return _jniApi.callFlutterEchoBool(aBool); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoBoolWithABool( + aBool, + wrappedError: error, + ); + _throwIfFfiError(error); + final bool dartTypeRes = res!.boolValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + int callFlutterEchoInt(int anInt) { + try { + if (_jniApi != null) { + return _jniApi.callFlutterEchoInt(anInt); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoIntWithAnInt( + anInt, + wrappedError: error, + ); + _throwIfFfiError(error); + final int dartTypeRes = res!.longValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + double callFlutterEchoDouble(double aDouble) { + try { + if (_jniApi != null) { + return _jniApi.callFlutterEchoDouble(aDouble); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoDoubleWithADouble( + aDouble, + wrappedError: error, + ); + _throwIfFfiError(error); + final double dartTypeRes = res!.doubleValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String callFlutterEchoString(String aString) { + try { + if (_jniApi != null) { + final JString res = _jniApi.callFlutterEchoString( + _PigeonJniCodec.writeValue(aString), + ); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi.callFlutterEchoStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + ); + _throwIfFfiError(error); + final String dartTypeRes = res!.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Uint8List callFlutterEchoUint8List(Uint8List list) { + try { + if (_jniApi != null) { + final JByteArray res = _jniApi.callFlutterEchoUint8List( + _PigeonJniCodec.writeValue(list), + ); + final Uint8List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoUint8ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Uint8List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int32List callFlutterEchoInt32List(Int32List list) { + try { + if (_jniApi != null) { + final JIntArray res = _jniApi.callFlutterEchoInt32List( + _PigeonJniCodec.writeValue(list), + ); + final Int32List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int32List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoInt32ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int32List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Int32List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int64List callFlutterEchoInt64List(Int64List list) { + try { + if (_jniApi != null) { + final JLongArray res = _jniApi.callFlutterEchoInt64List( + _PigeonJniCodec.writeValue(list), + ); + final Int64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoInt64ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int64List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Int64List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Float64List callFlutterEchoFloat64List(Float64List list) { + try { + if (_jniApi != null) { + final JDoubleArray res = _jniApi.callFlutterEchoFloat64List( + _PigeonJniCodec.writeValue(list), + ); + final Float64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Float64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoFloat64ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Float64List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Float64List); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List callFlutterEchoList(List list) { + try { + if (_jniApi != null) { + final JList res = _jniApi.callFlutterEchoList( + _PigeonJniCodec.writeValue>(list), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List callFlutterEchoEnumList(List enumList) { + try { + if (_jniApi != null) { + final JList res = _jniApi.callFlutterEchoEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List callFlutterEchoClassList( + List classList, + ) { + try { + if (_jniApi != null) { + final JList res = _jniApi + .callFlutterEchoClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List callFlutterEchoNonNullEnumList(List enumList) { + try { + if (_jniApi != null) { + final JList res = _jniApi + .callFlutterEchoNonNullEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List callFlutterEchoNonNullClassList( + List classList, + ) { + try { + if (_jniApi != null) { + final JList res = _jniApi + .callFlutterEchoNonNullClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi + .callFlutterEchoNonNullClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoMap(Map map) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.callFlutterEchoMap( + _PigeonJniCodec.writeValue>(map), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoStringMap( + Map stringMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.callFlutterEchoStringMap( + _PigeonJniCodec.writeValue>(stringMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoIntMap(Map intMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.callFlutterEchoIntMap( + _PigeonJniCodec.writeValue>(intMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoEnumMap( + Map enumMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .callFlutterEchoEnumMap( + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum)! + as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoClassMap( + Map classMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .callFlutterEchoClassMap( + _PigeonJniCodec.writeValue< + JMap + >(classMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoNonNullStringMap( + Map stringMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .callFlutterEchoNonNullStringMap( + _PigeonJniCodec.writeValue>(stringMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNonNullStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoNonNullIntMap(Map intMap) { + try { + if (_jniApi != null) { + final JMap res = _jniApi.callFlutterEchoNonNullIntMap( + _PigeonJniCodec.writeValue>(intMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNonNullIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoNonNullEnumMap( + Map enumMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .callFlutterEchoNonNullEnumMap( + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum)! + as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map callFlutterEchoNonNullClassMap( + Map classMap, + ) { + try { + if (_jniApi != null) { + final JMap res = _jniApi + .callFlutterEchoNonNullClassMap( + _PigeonJniCodec.writeValue< + JMap + >(classMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNonNullClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, int)! as Map) + .cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnEnum callFlutterEchoEnum(NIAnEnum anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum res = _jniApi.callFlutterEchoEnum( + anEnum.toJni(), + ); + final NIAnEnum dartTypeRes = NIAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoEnumWithAnEnum( + ffi_bridge.NIAnEnum.values[anEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnEnum dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as NIAnEnum); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnotherEnum callFlutterEchoNIAnotherEnum(NIAnotherEnum anotherEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum res = _jniApi + .callFlutterEchoNIAnotherEnum(anotherEnum.toJni()); + final NIAnotherEnum dartTypeRes = NIAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi + .callFlutterEchoNIAnotherEnumWithAnotherEnum( + ffi_bridge.NIAnotherEnum.values[anotherEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnotherEnum dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnotherEnum)! as NIAnotherEnum); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + bool? callFlutterEchoNullableBool(bool? aBool) { + try { + if (_jniApi != null) { + final JBoolean? res = _jniApi.callFlutterEchoNullableBool( + _PigeonJniCodec.writeValue(aBool), + ); + final bool? dartTypeRes = res?.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoNullableBoolWithABool( + _PigeonFfiCodec.writeValue(aBool), + wrappedError: error, + ); + _throwIfFfiError(error); + final bool? dartTypeRes = res?.boolValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + int? callFlutterEchoNullableInt(int? anInt) { + try { + if (_jniApi != null) { + final JLong? res = _jniApi.callFlutterEchoNullableInt( + _PigeonJniCodec.writeValue(anInt), + ); + final int? dartTypeRes = res?.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoNullableIntWithAnInt( + _PigeonFfiCodec.writeValue(anInt), + wrappedError: error, + ); + _throwIfFfiError(error); + final int? dartTypeRes = res?.longValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + double? callFlutterEchoNullableDouble(double? aDouble) { + try { + if (_jniApi != null) { + final JDouble? res = _jniApi.callFlutterEchoNullableDouble( + _PigeonJniCodec.writeValue(aDouble), + ); + final double? dartTypeRes = res?.toDartDouble(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoNullableDoubleWithADouble( + _PigeonFfiCodec.writeValue(aDouble), + wrappedError: error, + ); + _throwIfFfiError(error); + final double? dartTypeRes = res?.doubleValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String? callFlutterEchoNullableString(String? aString) { + try { + if (_jniApi != null) { + final JString? res = _jniApi.callFlutterEchoNullableString( + _PigeonJniCodec.writeValue(aString), + ); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSString? res = _ffiApi.callFlutterEchoNullableStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + ); + _throwIfFfiError(error); + final String? dartTypeRes = res?.toDartString(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Uint8List? callFlutterEchoNullableUint8List(Uint8List? list) { + try { + if (_jniApi != null) { + final JByteArray? res = _jniApi.callFlutterEchoNullableUint8List( + _PigeonJniCodec.writeValue(list), + ); + final Uint8List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoNullableUint8ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Uint8List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int32List? callFlutterEchoNullableInt32List(Int32List? list) { + try { + if (_jniApi != null) { + final JIntArray? res = _jniApi.callFlutterEchoNullableInt32List( + _PigeonJniCodec.writeValue(list), + ); + final Int32List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int32List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoNullableInt32ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int32List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Int32List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Int64List? callFlutterEchoNullableInt64List(Int64List? list) { + try { + if (_jniApi != null) { + final JLongArray? res = _jniApi.callFlutterEchoNullableInt64List( + _PigeonJniCodec.writeValue(list), + ); + final Int64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoNullableInt64ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Int64List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Int64List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Float64List? callFlutterEchoNullableFloat64List(Float64List? list) { + try { + if (_jniApi != null) { + final JDoubleArray? res = _jniApi.callFlutterEchoNullableFloat64List( + _PigeonJniCodec.writeValue(list), + ); + final Float64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Float64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final ffi_bridge.NiTestsPigeonTypedData? res = _ffiApi + .callFlutterEchoNullableFloat64ListWithList( + _PigeonFfiCodec.writeValue( + list, + ), + wrappedError: error, + ); + _throwIfFfiError(error); + final Float64List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Float64List?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? callFlutterEchoNullableList(List? list) { + try { + if (_jniApi != null) { + final JList? res = _jniApi.callFlutterEchoNullableList( + _PigeonJniCodec.writeValue?>(list), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoNullableListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? callFlutterEchoNullableEnumList(List? enumList) { + try { + if (_jniApi != null) { + final JList? res = _jniApi + .callFlutterEchoNullableEnumList( + _PigeonJniCodec.writeValue?>( + enumList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi + .callFlutterEchoNullableEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? callFlutterEchoNullableClassList( + List? classList, + ) { + try { + if (_jniApi != null) { + final JList? + res = _jniApi.callFlutterEchoNullableClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi + .callFlutterEchoNullableClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? callFlutterEchoNullableNonNullEnumList( + List? enumList, + ) { + try { + if (_jniApi != null) { + final JList? res = _jniApi + .callFlutterEchoNullableNonNullEnumList( + _PigeonJniCodec.writeValue?>(enumList), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi + .callFlutterEchoNullableNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + List? callFlutterEchoNullableNonNullClassList( + List? classList, + ) { + try { + if (_jniApi != null) { + final JList? res = _jniApi + .callFlutterEchoNullableNonNullClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSArray? res = _ffiApi + .callFlutterEchoNullableNonNullClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableMap( + Map? map, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableMap( + _PigeonJniCodec.writeValue?>(map), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoNullableMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableStringMap( + Map? stringMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableStringMap( + _PigeonJniCodec.writeValue?>(stringMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableIntMap(Map? intMap) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi.callFlutterEchoNullableIntMap( + _PigeonJniCodec.writeValue?>(intMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableEnumMap( + Map? enumMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableEnumMap( + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableClassMap( + Map? classMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableClassMap( + _PigeonJniCodec.writeValue< + JMap? + >(classMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableNonNullStringMap( + Map? stringMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableNonNullStringMap( + _PigeonJniCodec.writeValue?>(stringMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableNonNullStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableNonNullIntMap(Map? intMap) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableNonNullIntMap( + _PigeonJniCodec.writeValue?>(intMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableNonNullIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableNonNullEnumMap( + Map? enumMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableNonNullEnumMap( + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Map? callFlutterEchoNullableNonNullClassMap( + Map? classMap, + ) { + try { + if (_jniApi != null) { + final JMap? res = _jniApi + .callFlutterEchoNullableNonNullClassMap( + _PigeonJniCodec.writeValue< + JMap? + >(classMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSDictionary? res = _ffiApi + .callFlutterEchoNullableNonNullClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, int) as Map?) + ?.cast(); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnEnum? callFlutterEchoNullableEnum(NIAnEnum? anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum? res = _jniApi.callFlutterEchoNullableEnum( + anEnum == null ? null : anEnum.toJni(), + ); + final NIAnEnum? dartTypeRes = NIAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoNullableEnumWithAnEnum( + _PigeonFfiCodec.writeValue(anEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnEnum? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnEnum) as NIAnEnum?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NIAnotherEnum? callFlutterEchoAnotherNullableEnum( + NIAnotherEnum? anotherEnum, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum? res = _jniApi + .callFlutterEchoAnotherNullableEnum( + anotherEnum == null ? null : anotherEnum.toJni(), + ); + final NIAnotherEnum? dartTypeRes = NIAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi + .callFlutterEchoAnotherNullableEnumWithAnotherEnum( + _PigeonFfiCodec.writeValue(anotherEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NIAnotherEnum? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NIAnotherEnum) as NIAnotherEnum?); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterNoopAsync() async { + try { + if (_jniApi != null) { + await _jniApi.callFlutterNoopAsync(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterNoopAsyncWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid.listener(() { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNIAllTypes( + NIAllTypes everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAllTypes res = await _jniApi + .callFlutterEchoAsyncNIAllTypes(everything.toJni()); + final NIAllTypes dartTypeRes = NIAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNIAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NIAllTypesBridge.listener(( + ffi_bridge.NIAllTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NIAllTypes.fromFfi(res)!); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypes? res = await _jniApi + .callFlutterEchoAsyncNullableNIAllNullableTypes( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypes? dartTypeRes = NIAllNullableTypes.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = + Completer(); + _ffiApi.callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesBridge.listener(( + ffi_bridge.NIAllNullableTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NIAllNullableTypes.fromFfi(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAllNullableTypesWithoutRecursion? res = await _jniApi + .callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything == null ? null : everything.toJni(), + ); + final NIAllNullableTypesWithoutRecursion? dartTypeRes = + NIAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = + Completer(); + _ffiApi.callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything( + everything == null ? null : everything.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge + .ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge.listener( + (ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + NIAllNullableTypesWithoutRecursion.fromFfi(res), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncBool(bool aBool) async { + try { + if (_jniApi != null) { + final JBoolean res = await _jniApi.callFlutterEchoAsyncBool(aBool); + final bool dartTypeRes = res.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncBoolWithABool( + aBool, + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.boolValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncInt(int anInt) async { + try { + if (_jniApi != null) { + final JLong res = await _jniApi.callFlutterEchoAsyncInt(anInt); + final int dartTypeRes = res.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncIntWithAnInt( + anInt, + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.longValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncDouble(double aDouble) async { + try { + if (_jniApi != null) { + final JDouble res = await _jniApi.callFlutterEchoAsyncDouble(aDouble); + final double dartTypeRes = res.toDartDouble(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncDoubleWithADouble( + aDouble, + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.doubleValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncString(String aString) async { + try { + if (_jniApi != null) { + final JString res = await _jniApi.callFlutterEchoAsyncString( + _PigeonJniCodec.writeValue(aString), + ); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSString.listener(( + NSString? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.toDartString()); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncUint8List(Uint8List list) async { + try { + if (_jniApi != null) { + final JByteArray res = await _jniApi.callFlutterEchoAsyncUint8List( + _PigeonJniCodec.writeValue(list), + ); + final Uint8List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncUint8ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Uint8List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncInt32List(Int32List list) async { + try { + if (_jniApi != null) { + final JIntArray res = await _jniApi.callFlutterEchoAsyncInt32List( + _PigeonJniCodec.writeValue(list), + ); + final Int32List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int32List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncInt32ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Int32List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncInt64List(Int64List list) async { + try { + if (_jniApi != null) { + final JLongArray res = await _jniApi.callFlutterEchoAsyncInt64List( + _PigeonJniCodec.writeValue(list), + ); + final Int64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncInt64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Int64List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncFloat64List(Float64List list) async { + try { + if (_jniApi != null) { + final JDoubleArray res = await _jniApi.callFlutterEchoAsyncFloat64List( + _PigeonJniCodec.writeValue(list), + ); + final Float64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Float64List); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncFloat64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Float64List), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncObject(Object anObject) async { + try { + if (_jniApi != null) { + final JObject res = await _jniApi.callFlutterEchoAsyncObject( + _PigeonJniCodec.writeValue(anObject), + ); + final Object dartTypeRes = _PigeonJniCodec.readValue(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncObjectWithAnObject( + _PigeonFfiCodec.writeValue(anObject, generic: true), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)!); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncList(List list) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi.callFlutterEchoAsyncList( + _PigeonJniCodec.writeValue>(list), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = Completer>(); + _ffiApi.callFlutterEchoAsyncListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncEnumList( + List enumList, + ) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi + .callFlutterEchoAsyncEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncClassList( + List classList, + ) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi + .callFlutterEchoAsyncClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncNonNullEnumList( + List enumList, + ) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi + .callFlutterEchoAsyncNonNullEnumList( + _PigeonJniCodec.writeValue>(enumList), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = Completer>(); + _ffiApi.callFlutterEchoAsyncNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncNonNullClassList( + List classList, + ) async { + try { + if (_jniApi != null) { + final JList res = await _jniApi + .callFlutterEchoAsyncNonNullClassList( + _PigeonJniCodec.writeValue>( + classList, + ), + ); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncNonNullClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as List) + .cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncMap( + Map map, + ) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi + .callFlutterEchoAsyncMap( + _PigeonJniCodec.writeValue>(map), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncStringMap( + Map stringMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi + .callFlutterEchoAsyncStringMap( + _PigeonJniCodec.writeValue>(stringMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res)! as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncIntMap( + Map intMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi + .callFlutterEchoAsyncIntMap( + _PigeonJniCodec.writeValue>(intMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int, int)! + as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncEnumMap( + Map enumMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = + await _jniApi.callFlutterEchoAsyncEnumMap( + _PigeonJniCodec.writeValue< + JMap + >(enumMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum)! + as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future> callFlutterEchoAsyncClassMap( + Map classMap, + ) async { + try { + if (_jniApi != null) { + final JMap res = await _jniApi + .callFlutterEchoAsyncClassMap( + _PigeonJniCodec.writeValue< + JMap + >(classMap), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer> completer = + Completer>(); + _ffiApi.callFlutterEchoAsyncClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int)! + as Map) + .cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncEnum(NIAnEnum anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum res = await _jniApi.callFlutterEchoAsyncEnum( + anEnum.toJni(), + ); + final NIAnEnum dartTypeRes = NIAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncEnumWithAnEnum( + ffi_bridge.NIAnEnum.values[anEnum.index], + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum)! as NIAnEnum), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAnotherAsyncEnum( + NIAnotherEnum anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum res = await _jniApi + .callFlutterEchoAnotherAsyncEnum(anotherEnum.toJni()); + final NIAnotherEnum dartTypeRes = NIAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAnotherAsyncEnumWithAnotherEnum( + ffi_bridge.NIAnotherEnum.values[anotherEnum.index], + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnotherEnum)! + as NIAnotherEnum), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableBool(bool? aBool) async { + try { + if (_jniApi != null) { + final JBoolean? res = await _jniApi.callFlutterEchoAsyncNullableBool( + _PigeonJniCodec.writeValue(aBool), + ); + final bool? dartTypeRes = res?.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableBoolWithABool( + _PigeonFfiCodec.writeValue(aBool), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.boolValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableInt(int? anInt) async { + try { + if (_jniApi != null) { + final JLong? res = await _jniApi.callFlutterEchoAsyncNullableInt( + _PigeonJniCodec.writeValue(anInt), + ); + final int? dartTypeRes = res?.toDartInt(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableIntWithAnInt( + _PigeonFfiCodec.writeValue(anInt), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.longValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableDouble(double? aDouble) async { + try { + if (_jniApi != null) { + final JDouble? res = await _jniApi.callFlutterEchoAsyncNullableDouble( + _PigeonJniCodec.writeValue(aDouble), + ); + final double? dartTypeRes = res?.toDartDouble(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableDoubleWithADouble( + _PigeonFfiCodec.writeValue(aDouble), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.doubleValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableString(String? aString) async { + try { + if (_jniApi != null) { + final JString? res = await _jniApi.callFlutterEchoAsyncNullableString( + _PigeonJniCodec.writeValue(aString), + ); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableStringWithAString( + _PigeonFfiCodec.writeValue(aString), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSString.listener(( + NSString? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res?.toDartString()); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableUint8List( + Uint8List? list, + ) async { + try { + if (_jniApi != null) { + final JByteArray? res = await _jniApi + .callFlutterEchoAsyncNullableUint8List( + _PigeonJniCodec.writeValue(list), + ); + final Uint8List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableUint8ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Uint8List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableInt32List( + Int32List? list, + ) async { + try { + if (_jniApi != null) { + final JIntArray? res = await _jniApi + .callFlutterEchoAsyncNullableInt32List( + _PigeonJniCodec.writeValue(list), + ); + final Int32List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int32List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableInt32ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Int32List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableInt64List( + Int64List? list, + ) async { + try { + if (_jniApi != null) { + final JLongArray? res = await _jniApi + .callFlutterEchoAsyncNullableInt64List( + _PigeonJniCodec.writeValue(list), + ); + final Int64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableInt64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Int64List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableFloat64List( + Float64List? list, + ) async { + try { + if (_jniApi != null) { + final JDoubleArray? res = await _jniApi + .callFlutterEchoAsyncNullableFloat64List( + _PigeonJniCodec.writeValue(list), + ); + final Float64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Float64List?); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableFloat64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData.listener(( + ffi_bridge.NiTestsPigeonTypedData? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Float64List?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterThrowFlutterErrorAsync() async { + try { + if (_jniApi != null) { + final JObject? res = await _jniApi.callFlutterThrowFlutterErrorAsync(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterThrowFlutterErrorAsyncWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableObject(Object? anObject) async { + try { + if (_jniApi != null) { + final JObject? res = await _jniApi.callFlutterEchoAsyncNullableObject( + _PigeonJniCodec.writeValue(anObject), + ); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableObjectWithAnObject( + _PigeonFfiCodec.writeValue(anObject, generic: true), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSObject.listener(( + NSObject? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(_PigeonFfiCodec.readValue(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableList( + List? list, + ) async { + try { + if (_jniApi != null) { + final JList? res = await _jniApi + .callFlutterEchoAsyncNullableList( + _PigeonJniCodec.writeValue?>(list), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableEnumList( + List? enumList, + ) async { + try { + if (_jniApi != null) { + final JList? res = await _jniApi + .callFlutterEchoAsyncNullableEnumList( + _PigeonJniCodec.writeValue?>( + enumList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableClassList( + List? classList, + ) async { + try { + if (_jniApi != null) { + final JList? + res = await _jniApi.callFlutterEchoAsyncNullableClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableNonNullEnumList( + List? enumList, + ) async { + try { + if (_jniApi != null) { + final JList? res = await _jniApi + .callFlutterEchoAsyncNullableNonNullEnumList( + _PigeonJniCodec.writeValue?>(enumList), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> + callFlutterEchoAsyncNullableNonNullClassList( + List? classList, + ) async { + try { + if (_jniApi != null) { + final JList? res = await _jniApi + .callFlutterEchoAsyncNullableNonNullClassList( + _PigeonJniCodec.writeValue?>( + classList, + ), + ); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableNonNullClassListWithClassList( + _PigeonFfiCodec.writeValue(classList), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSArray.listener(( + NSArray? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as List?) + ?.cast(), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableMap( + Map? map, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .callFlutterEchoAsyncNullableMap( + _PigeonJniCodec.writeValue?>(map), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableMapWithMap( + _PigeonFfiCodec.writeValue(map), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableStringMap( + Map? stringMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .callFlutterEchoAsyncNullableStringMap( + _PigeonJniCodec.writeValue?>(stringMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableStringMapWithStringMap( + _PigeonFfiCodec.writeValue(stringMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res) as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableIntMap( + Map? intMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .callFlutterEchoAsyncNullableIntMap( + _PigeonJniCodec.writeValue?>(intMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableIntMapWithIntMap( + _PigeonFfiCodec.writeValue(intMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int, int) + as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableEnumMap( + Map? enumMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = + await _jniApi.callFlutterEchoAsyncNullableEnumMap( + _PigeonJniCodec.writeValue< + JMap? + >(enumMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future?> callFlutterEchoAsyncNullableClassMap( + Map? classMap, + ) async { + try { + if (_jniApi != null) { + final JMap? res = await _jniApi + .callFlutterEchoAsyncNullableClassMap( + _PigeonJniCodec.writeValue< + JMap? + >(classMap), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer?> completer = + Completer?>(); + _ffiApi.callFlutterEchoAsyncNullableClassMapWithClassMap( + _PigeonFfiCodec.writeValue(classMap), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSDictionary.listener( + (NSDictionary? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, int) + as Map?) + ?.cast(), + ); + } + }, + ), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableEnum(NIAnEnum? anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnEnum? res = await _jniApi + .callFlutterEchoAsyncNullableEnum( + anEnum == null ? null : anEnum.toJni(), + ); + final NIAnEnum? dartTypeRes = NIAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableEnumWithAnEnum( + _PigeonFfiCodec.writeValue(anEnum), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnEnum) as NIAnEnum?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NIAnotherEnum? res = await _jniApi + .callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum == null ? null : anotherEnum.toJni(), + ); + final NIAnotherEnum? dartTypeRes = NIAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum( + _PigeonFfiCodec.writeValue(anotherEnum), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + (_PigeonFfiCodec.readValue(res, NIAnotherEnum) + as NIAnotherEnum?), + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + bool defaultIsMainThread() { + try { + if (_jniApi != null) { + return _jniApi.defaultIsMainThread(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final NSNumber? res = _ffiApi.defaultIsMainThreadWithWrappedError( + error, + ); + _throwIfFfiError(error); + final bool dartTypeRes = res!.boolValue; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterNoopOnBackgroundThread() async { + try { + if (_jniApi != null) { + final JBoolean res = await _jniApi.callFlutterNoopOnBackgroundThread(); + final bool dartTypeRes = res.toDartBool(releaseOriginal: true); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NiTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterNoopOnBackgroundThreadWithWrappedError( + error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NSNumber.listener(( + NSNumber? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(res!.boolValue); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } +} + +/// The core interface that each host language plugin must implement in +/// platform_test integration tests. +class NIHostIntegrationCoreApi { + /// Constructor for [NIHostIntegrationCoreApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + NIHostIntegrationCoreApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + NIHostIntegrationCoreApiForNativeInterop? nativeInteropApi, + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : '', + _nativeInteropApi = nativeInteropApi; + + /// Creates an instance of [NIHostIntegrationCoreApi] that requests an instance of + /// [NIHostIntegrationCoreApiForNativeInterop] from the host platform with a matching instance name + /// to [messageChannelSuffix] or the default instance. + /// + /// Throws [ArgumentError] if no matching instance can be found. + factory NIHostIntegrationCoreApi.createWithNativeInteropApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + NIHostIntegrationCoreApiForNativeInterop? nativeInteropApi; + String nativeInteropApiInstanceName = ''; + if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) { + if (messageChannelSuffix.isEmpty) { + nativeInteropApi = + NIHostIntegrationCoreApiForNativeInterop.getInstance(); + } else { + nativeInteropApiInstanceName = messageChannelSuffix; + nativeInteropApi = NIHostIntegrationCoreApiForNativeInterop.getInstance( + channelName: messageChannelSuffix, + ); + } + } + if (nativeInteropApi == null) { + throw ArgumentError( + 'No NIHostIntegrationCoreApi instance with ${nativeInteropApiInstanceName.isEmpty ? 'no ' : ''} instance name ${nativeInteropApiInstanceName.isNotEmpty ? '"$nativeInteropApiInstanceName" ' : ''}found.', + ); + } + return NIHostIntegrationCoreApi( + binaryMessenger: binaryMessenger, + messageChannelSuffix: messageChannelSuffix, + nativeInteropApi: nativeInteropApi, + ); + } + + final BinaryMessenger? pigeonVar_binaryMessenger; + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + final NIHostIntegrationCoreApiForNativeInterop? _nativeInteropApi; + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + Future noop() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.noop(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.noop$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + Future echoAllTypes(NIAllTypes everything) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAllTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllTypes; + } + + /// Returns an error, to test error handling. + Future throwError() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.throwError(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.throwError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + /// Returns an error from a void function, to test error handling. + Future throwErrorFromVoid() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.throwErrorFromVoid(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.throwErrorFromVoid$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + /// Returns a Flutter error, to test error handling. + Future throwFlutterError() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.throwFlutterError(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.throwFlutterError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + /// Returns passed in int. + Future echoInt(int anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as int; + } + + /// Returns passed in double. + Future echoDouble(double aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as double; + } + + /// Returns the passed in boolean. + Future echoBool(bool aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as bool; + } + + /// Returns the passed in string. + Future echoString(String aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as String; + } + + /// Returns the passed in Uint8List. + Future echoUint8List(Uint8List aUint8List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoUint8List(aUint8List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aUint8List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Uint8List; + } + + /// Returns the passed in Int32List. + Future echoInt32List(Int32List aInt32List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoInt32List(aInt32List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aInt32List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int32List; + } + + /// Returns the passed in Int64List. + Future echoInt64List(Int64List aInt64List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoInt64List(aInt64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aInt64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int64List; + } + + /// Returns the passed in Float64List. + Future echoFloat64List(Float64List aFloat64List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoFloat64List(aFloat64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aFloat64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Float64List; + } + + /// Returns the passed in generic Object. + Future echoObject(Object anObject) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoObject(anObject); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoObject$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anObject], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue!; + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoList(List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as List; + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoStringList(List stringList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoStringList(stringList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoStringList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoIntList(List intList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoIntList(intList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoIntList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoDoubleList(List doubleList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoDoubleList(doubleList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoDoubleList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [doubleList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoBoolList(List boolList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoBoolList(boolList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoBoolList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [boolList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoEnumList(List enumList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoNonNullEnumList(List enumList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNonNullEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNonNullEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future> echoNonNullClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNonNullClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNonNullClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoMap(Map map) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Map; + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoStringMap( + Map stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoIntMap(Map intMap) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map).cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoEnumMap( + Map enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoClassMap( + Map classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoNonNullStringMap( + Map stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNonNullStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNonNullStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoNonNullIntMap(Map intMap) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNonNullIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNonNullIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map).cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoNonNullEnumMap( + Map enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNonNullEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNonNullEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future> echoNonNullClassMap( + Map classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNonNullClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNonNullClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed class to test nested class serialization and deserialization. + Future echoClassWrapper( + NIAllClassesWrapper wrapper, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoClassWrapper(wrapper); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoClassWrapper$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [wrapper], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllClassesWrapper; + } + + /// Returns the passed enum to test serialization and deserialization. + Future echoEnum(NIAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnEnum; + } + + /// Returns the passed enum to test serialization and deserialization. + Future echoAnotherEnum(NIAnotherEnum anotherEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAnotherEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnotherEnum; + } + + /// Returns the default string. + Future echoNamedDefaultString({String aString = 'default'}) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNamedDefaultString(aString: aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNamedDefaultString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as String; + } + + /// Returns passed in double. + Future echoOptionalDefaultDouble([double aDouble = 3.14]) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoOptionalDefaultDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoOptionalDefaultDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as double; + } + + /// Returns passed in int. + Future echoRequiredInt({required int anInt}) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoRequiredInt(anInt: anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoRequiredInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as int; + } + + /// Returns the passed object, to test serialization and deserialization. + Future echoAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAllNullableTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAllNullableTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypes?; + } + + /// Returns the passed object, to test serialization and deserialization. + Future + echoAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAllNullableTypesWithoutRecursion(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAllNullableTypesWithoutRecursion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypesWithoutRecursion?; + } + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + Future extractNestedNullableString( + NIAllClassesWrapper wrapper, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.extractNestedNullableString(wrapper); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.extractNestedNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [wrapper], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as String?; + } + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + Future createNestedNullableString( + String? nullableString, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.createNestedNullableString(nullableString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.createNestedNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [nullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllClassesWrapper; + } + + Future sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.sendMultipleNullableTypes( + aNullableBool, + aNullableInt, + aNullableString, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.sendMultipleNullableTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableBool, aNullableInt, aNullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllNullableTypes; + } + + Future + sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.sendMultipleNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableString, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.sendMultipleNullableTypesWithoutRecursion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableBool, aNullableInt, aNullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllNullableTypesWithoutRecursion; + } + + /// Returns passed in int. + Future echoNullableInt(int? aNullableInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableInt(aNullableInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as int?; + } + + /// Returns passed in double. + Future echoNullableDouble(double? aNullableDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableDouble(aNullableDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as double?; + } + + /// Returns the passed in boolean. + Future echoNullableBool(bool? aNullableBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableBool(aNullableBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as bool?; + } + + /// Returns the passed in string. + Future echoNullableString(String? aNullableString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableString(aNullableString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as String?; + } + + /// Returns the passed in Uint8List. + Future echoNullableUint8List( + Uint8List? aNullableUint8List, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableUint8List(aNullableUint8List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableUint8List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Uint8List?; + } + + /// Returns the passed in Int32List. + Future echoNullableInt32List( + Int32List? aNullableInt32List, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableInt32List(aNullableInt32List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableInt32List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int32List?; + } + + /// Returns the passed in Int64List. + Future echoNullableInt64List( + Int64List? aNullableInt64List, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableInt64List(aNullableInt64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableInt64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int64List?; + } + + /// Returns the passed in Float64List. + Future echoNullableFloat64List( + Float64List? aNullableFloat64List, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableFloat64List(aNullableFloat64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableFloat64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Float64List?; + } + + /// Returns the passed in generic Object. + Future echoNullableObject(Object? aNullableObject) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableObject(aNullableObject); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableObject$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableObject], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + /// Returns the passed list, to test serialization and deserialization. + Future?> echoNullableList(List? aNullableList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableList(aNullableList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as List?; + } + + /// Returns the passed list, to test serialization and deserialization. + Future?> echoNullableEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future?> echoNullableClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?) + ?.cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future?> echoNullableNonNullEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableNonNullEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableNonNullEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + /// Returns the passed list, to test serialization and deserialization. + Future?> echoNullableNonNullClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableNonNullClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableNonNullClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableMap( + Map? map, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Map?; + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableStringMap( + Map? stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableIntMap(Map? intMap) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?)?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableEnumMap( + Map? enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableClassMap( + Map? classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableNonNullStringMap( + Map? stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableNonNullStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableNonNullStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableNonNullIntMap( + Map? intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableNonNullIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableNonNullIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?)?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableNonNullEnumMap( + Map? enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableNonNullEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableNonNullEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test serialization and deserialization. + Future?> echoNullableNonNullClassMap( + Map? classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableNonNullClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableNonNullClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future echoNullableEnum(NIAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnEnum?; + } + + Future echoAnotherNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAnotherNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnotherEnum?; + } + + /// Returns passed in int. + Future echoOptionalNullableInt([int? aNullableInt]) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoOptionalNullableInt(aNullableInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoOptionalNullableInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as int?; + } + + /// Returns the passed in string. + Future echoNamedNullableString({String? aNullableString}) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoNamedNullableString( + aNullableString: aNullableString, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoNamedNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as String?; + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + Future noopAsync() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.noopAsync(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.noopAsync$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + /// Returns passed in int asynchronously. + Future echoAsyncInt(int anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as int; + } + + /// Returns passed in double asynchronously. + Future echoAsyncDouble(double aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as double; + } + + /// Returns the passed in boolean asynchronously. + Future echoAsyncBool(bool aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as bool; + } + + /// Returns the passed string asynchronously. + Future echoAsyncString(String aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as String; + } + + /// Returns the passed in Uint8List asynchronously. + Future echoAsyncUint8List(Uint8List aUint8List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncUint8List(aUint8List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aUint8List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Uint8List; + } + + /// Returns the passed in Int32List asynchronously. + Future echoAsyncInt32List(Int32List aInt32List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncInt32List(aInt32List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aInt32List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int32List; + } + + /// Returns the passed in Int64List asynchronously. + Future echoAsyncInt64List(Int64List aInt64List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncInt64List(aInt64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aInt64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int64List; + } + + /// Returns the passed in Float64List asynchronously. + Future echoAsyncFloat64List(Float64List aFloat64List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncFloat64List(aFloat64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aFloat64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Float64List; + } + + /// Returns the passed in generic Object asynchronously. + Future echoAsyncObject(Object anObject) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncObject(anObject); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncObject$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anObject], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue!; + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + Future> echoAsyncList(List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as List; + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + Future> echoAsyncEnumList(List enumList) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + Future> echoAsyncClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future> echoAsyncMap(Map map) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Map; + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future> echoAsyncStringMap( + Map stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future> echoAsyncIntMap(Map intMap) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map).cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future> echoAsyncEnumMap( + Map enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future> echoAsyncClassMap( + Map classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + Future echoAsyncEnum(NIAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnEnum; + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + Future echoAnotherAsyncEnum(NIAnotherEnum anotherEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherAsyncEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAnotherAsyncEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnotherEnum; + } + + /// Responds with an error from an async function returning a value. + Future throwAsyncError() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.throwAsyncError(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.throwAsyncError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + /// Responds with an error from an async void function. + Future throwAsyncErrorFromVoid() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.throwAsyncErrorFromVoid(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.throwAsyncErrorFromVoid$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + /// Responds with a Flutter error from an async function returning a value. + Future throwAsyncFlutterError() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.throwAsyncFlutterError(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.throwAsyncFlutterError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + /// Returns the passed object, to test async serialization and deserialization. + Future echoAsyncNIAllTypes(NIAllTypes everything) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNIAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNIAllTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllTypes; + } + + /// Returns the passed object, to test serialization and deserialization. + Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableNIAllNullableTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableNIAllNullableTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypes?; + } + + /// Returns the passed object, to test serialization and deserialization. + Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi + .echoAsyncNullableNIAllNullableTypesWithoutRecursion(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableNIAllNullableTypesWithoutRecursion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypesWithoutRecursion?; + } + + /// Returns passed in int asynchronously. + Future echoAsyncNullableInt(int? anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as int?; + } + + /// Returns passed in double asynchronously. + Future echoAsyncNullableDouble(double? aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as double?; + } + + /// Returns the passed in boolean asynchronously. + Future echoAsyncNullableBool(bool? aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as bool?; + } + + /// Returns the passed string asynchronously. + Future echoAsyncNullableString(String? aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as String?; + } + + /// Returns the passed in Uint8List asynchronously. + Future echoAsyncNullableUint8List(Uint8List? aUint8List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableUint8List(aUint8List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aUint8List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Uint8List?; + } + + /// Returns the passed in Int32List asynchronously. + Future echoAsyncNullableInt32List(Int32List? aInt32List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableInt32List(aInt32List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aInt32List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int32List?; + } + + /// Returns the passed in Int64List asynchronously. + Future echoAsyncNullableInt64List(Int64List? aInt64List) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableInt64List(aInt64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aInt64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int64List?; + } + + /// Returns the passed in Float64List asynchronously. + Future echoAsyncNullableFloat64List( + Float64List? aFloat64List, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableFloat64List(aFloat64List); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aFloat64List], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Float64List?; + } + + /// Returns the passed in generic Object asynchronously. + Future echoAsyncNullableObject(Object? anObject) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableObject(anObject); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableObject$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anObject], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableList(List? list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as List?; + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?) + ?.cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableMap( + Map? map, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Map?; + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableStringMap( + Map? stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableIntMap( + Map? intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?)?.cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableEnumMap( + Map? enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + Future?> echoAsyncNullableClassMap( + Map? classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + Future echoAsyncNullableEnum(NIAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAsyncNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnEnum?; + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherAsyncNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.echoAnotherAsyncNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnotherEnum?; + } + + Future callFlutterNoop() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterNoop(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterNoop$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + Future callFlutterThrowError() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterThrowError(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterThrowError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + Future callFlutterThrowErrorFromVoid() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterThrowErrorFromVoid(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterThrowErrorFromVoid$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + Future callFlutterEchoNIAllTypes(NIAllTypes everything) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNIAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNIAllTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllTypes; + } + + Future callFlutterEchoNIAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNIAllNullableTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNIAllNullableTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypes?; + } + + Future callFlutterSendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterSendMultipleNullableTypes( + aNullableBool, + aNullableInt, + aNullableString, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterSendMultipleNullableTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableBool, aNullableInt, aNullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllNullableTypes; + } + + Future + callFlutterEchoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi + .callFlutterEchoNIAllNullableTypesWithoutRecursion(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNIAllNullableTypesWithoutRecursion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypesWithoutRecursion?; + } + + Future + callFlutterSendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi + .callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableString, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterSendMultipleNullableTypesWithoutRecursion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aNullableBool, aNullableInt, aNullableString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllNullableTypesWithoutRecursion; + } + + Future callFlutterEchoBool(bool aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as bool; + } + + Future callFlutterEchoInt(int anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as int; + } + + Future callFlutterEchoDouble(double aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as double; + } + + Future callFlutterEchoString(String aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as String; + } + + Future callFlutterEchoUint8List(Uint8List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoUint8List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Uint8List; + } + + Future callFlutterEchoInt32List(Int32List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoInt32List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int32List; + } + + Future callFlutterEchoInt64List(Int64List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoInt64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int64List; + } + + Future callFlutterEchoFloat64List(Float64List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoFloat64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Float64List; + } + + Future> callFlutterEchoList(List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as List; + } + + Future> callFlutterEchoEnumList( + List enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoNonNullEnumList( + List enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNonNullEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNonNullEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoNonNullClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNonNullClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNonNullClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoMap( + Map map, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Map; + } + + Future> callFlutterEchoStringMap( + Map stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoIntMap(Map intMap) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map).cast(); + } + + Future> callFlutterEchoEnumMap( + Map enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoClassMap( + Map classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoNonNullStringMap( + Map stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNonNullStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNonNullStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoNonNullIntMap( + Map intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNonNullIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNonNullIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map).cast(); + } + + Future> callFlutterEchoNonNullEnumMap( + Map enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNonNullEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNonNullEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoNonNullClassMap( + Map classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNonNullClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNonNullClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future callFlutterEchoEnum(NIAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnEnum; + } + + Future callFlutterEchoNIAnotherEnum( + NIAnotherEnum anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNIAnotherEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNIAnotherEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnotherEnum; + } + + Future callFlutterEchoNullableBool(bool? aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as bool?; + } + + Future callFlutterEchoNullableInt(int? anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as int?; + } + + Future callFlutterEchoNullableDouble(double? aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as double?; + } + + Future callFlutterEchoNullableString(String? aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as String?; + } + + Future callFlutterEchoNullableUint8List(Uint8List? list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableUint8List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Uint8List?; + } + + Future callFlutterEchoNullableInt32List(Int32List? list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableInt32List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int32List?; + } + + Future callFlutterEchoNullableInt64List(Int64List? list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableInt64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int64List?; + } + + Future callFlutterEchoNullableFloat64List( + Float64List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableFloat64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Float64List?; + } + + Future?> callFlutterEchoNullableList( + List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as List?; + } + + Future?> callFlutterEchoNullableEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + Future?> callFlutterEchoNullableClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?) + ?.cast(); + } + + Future?> callFlutterEchoNullableNonNullEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableNonNullEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableNonNullEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + Future?> callFlutterEchoNullableNonNullClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableNonNullClassList( + classList, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableNonNullClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + Future?> callFlutterEchoNullableMap( + Map? map, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Map?; + } + + Future?> callFlutterEchoNullableStringMap( + Map? stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoNullableIntMap( + Map? intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?)?.cast(); + } + + Future?> callFlutterEchoNullableEnumMap( + Map? enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoNullableClassMap( + Map? classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoNullableNonNullStringMap( + Map? stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableNonNullStringMap( + stringMap, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableNonNullStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoNullableNonNullIntMap( + Map? intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableNonNullIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableNonNullIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?)?.cast(); + } + + Future?> callFlutterEchoNullableNonNullEnumMap( + Map? enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableNonNullEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableNonNullEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoNullableNonNullClassMap( + Map? classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableNonNullClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableNonNullClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future callFlutterEchoNullableEnum(NIAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnEnum?; + } + + Future callFlutterEchoAnotherNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAnotherNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAnotherNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnotherEnum?; + } + + Future callFlutterNoopAsync() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterNoopAsync(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterNoopAsync$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + } + + Future callFlutterEchoAsyncNIAllTypes( + NIAllTypes everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNIAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNIAllTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAllTypes; + } + + Future callFlutterEchoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableNIAllNullableTypes( + everything, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableNIAllNullableTypes$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypes?; + } + + Future + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi + .callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [everything], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAllNullableTypesWithoutRecursion?; + } + + Future callFlutterEchoAsyncBool(bool aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as bool; + } + + Future callFlutterEchoAsyncInt(int anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as int; + } + + Future callFlutterEchoAsyncDouble(double aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as double; + } + + Future callFlutterEchoAsyncString(String aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as String; + } + + Future callFlutterEchoAsyncUint8List(Uint8List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncUint8List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Uint8List; + } + + Future callFlutterEchoAsyncInt32List(Int32List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncInt32List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int32List; + } + + Future callFlutterEchoAsyncInt64List(Int64List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncInt64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Int64List; + } + + Future callFlutterEchoAsyncFloat64List(Float64List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncFloat64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Float64List; + } + + Future callFlutterEchoAsyncObject(Object anObject) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncObject(anObject); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncObject$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anObject], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue!; + } + + Future> callFlutterEchoAsyncList(List list) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as List; + } + + Future> callFlutterEchoAsyncEnumList( + List enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoAsyncClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoAsyncNonNullEnumList( + List enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNonNullEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNonNullEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoAsyncNonNullClassList( + List classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNonNullClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNonNullClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List).cast(); + } + + Future> callFlutterEchoAsyncMap( + Map map, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as Map; + } + + Future> callFlutterEchoAsyncStringMap( + Map stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoAsyncIntMap( + Map intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map).cast(); + } + + Future> callFlutterEchoAsyncEnumMap( + Map enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future> callFlutterEchoAsyncClassMap( + Map classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as Map) + .cast(); + } + + Future callFlutterEchoAsyncEnum(NIAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnEnum; + } + + Future callFlutterEchoAnotherAsyncEnum( + NIAnotherEnum anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAnotherAsyncEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAnotherAsyncEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as NIAnotherEnum; + } + + Future callFlutterEchoAsyncNullableBool(bool? aBool) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableBool(aBool); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableBool$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aBool], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as bool?; + } + + Future callFlutterEchoAsyncNullableInt(int? anInt) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableInt(anInt); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableInt$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anInt], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as int?; + } + + Future callFlutterEchoAsyncNullableDouble(double? aDouble) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableDouble(aDouble); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableDouble$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aDouble], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as double?; + } + + Future callFlutterEchoAsyncNullableString(String? aString) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableString(aString); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableString$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [aString], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as String?; + } + + Future callFlutterEchoAsyncNullableUint8List( + Uint8List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableUint8List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableUint8List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Uint8List?; + } + + Future callFlutterEchoAsyncNullableInt32List( + Int32List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableInt32List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableInt32List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int32List?; + } + + Future callFlutterEchoAsyncNullableInt64List( + Int64List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableInt64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableInt64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Int64List?; + } + + Future callFlutterEchoAsyncNullableFloat64List( + Float64List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableFloat64List(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableFloat64List$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Float64List?; + } + + Future callFlutterThrowFlutterErrorAsync() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterThrowFlutterErrorAsync(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterThrowFlutterErrorAsync$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + Future callFlutterEchoAsyncNullableObject(Object? anObject) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableObject(anObject); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableObject$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anObject], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue; + } + + Future?> callFlutterEchoAsyncNullableList( + List? list, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableList(list); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as List?; + } + + Future?> callFlutterEchoAsyncNullableEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableEnumList(enumList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + Future?> callFlutterEchoAsyncNullableClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableClassList(classList); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?) + ?.cast(); + } + + Future?> callFlutterEchoAsyncNullableNonNullEnumList( + List? enumList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableNonNullEnumList( + enumList, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableNonNullEnumList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + Future?> + callFlutterEchoAsyncNullableNonNullClassList( + List? classList, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableNonNullClassList( + classList, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableNonNullClassList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classList], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as List?)?.cast(); + } + + Future?> callFlutterEchoAsyncNullableMap( + Map? map, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableMap(map); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [map], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as Map?; + } + + Future?> callFlutterEchoAsyncNullableStringMap( + Map? stringMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableStringMap(stringMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableStringMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [stringMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoAsyncNullableIntMap( + Map? intMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableIntMap(intMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableIntMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [intMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?)?.cast(); + } + + Future?> callFlutterEchoAsyncNullableEnumMap( + Map? enumMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableEnumMap(enumMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableEnumMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enumMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future?> callFlutterEchoAsyncNullableClassMap( + Map? classMap, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableClassMap(classMap); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableClassMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [classMap], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return (pigeonVar_replyValue as Map?) + ?.cast(); + } + + Future callFlutterEchoAsyncNullableEnum(NIAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAsyncNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnEnum?; + } + + Future callFlutterEchoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterEchoAnotherAsyncNullableEnum$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [anotherEnum], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ); + return pigeonVar_replyValue as NIAnotherEnum?; + } + + /// Returns true if the handler is run on a main thread. + Future defaultIsMainThread() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.defaultIsMainThread(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.defaultIsMainThread$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as bool; + } + + /// Spawns a background thread and calls `noop` on the [NIFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + Future callFlutterNoopOnBackgroundThread() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && + _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterNoopOnBackgroundThread(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NIHostIntegrationCoreApi.callFlutterNoopOnBackgroundThread$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as bool; + } +} + +/// The core interface that the Dart platform_test code implements for host +/// integration tests to call into. +final class NIFlutterIntegrationCoreApiRegistrar + with jni_bridge.$NIFlutterIntegrationCoreApi { + NIFlutterIntegrationCoreApi? dartApi; + + NIFlutterIntegrationCoreApi register( + NIFlutterIntegrationCoreApi api, { + String name = defaultInstanceName, + }) { + dartApi = api; + + if (Platform.isAndroid) { + final jni_bridge.NIFlutterIntegrationCoreApi impl = + jni_bridge.NIFlutterIntegrationCoreApi.implement(this); + jni_bridge.NIFlutterIntegrationCoreApiRegistrar().registerInstance( + impl, + name.toJString(), + ); + } + if (Platform.isIOS || Platform.isMacOS) { + final ObjCProtocolBuilder builder = ObjCProtocolBuilder( + debugName: 'NIFlutterIntegrationCoreApiBridge', + ); + ffi_bridge.NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_ + .implement(builder, (ffi_bridge.NiTestsError errorOut) { + try { + if (dartApi != null) { + dartApi!.noop(); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorWithError_ + .implement(builder, (ffi_bridge.NiTestsError errorOut) { + try { + if (dartApi != null) { + final Object? response = dartApi!.throwFlutterError(); + return _PigeonFfiCodec.writeValue( + response, + generic: true, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_ + .implement(builder, (ffi_bridge.NiTestsError errorOut) { + try { + if (dartApi != null) { + final Object? response = dartApi!.throwError(); + return _PigeonFfiCodec.writeValue( + response, + generic: true, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .throwErrorFromVoidWithError_ + .implement(builder, (ffi_bridge.NiTestsError errorOut) { + try { + if (dartApi != null) { + dartApi!.throwErrorFromVoid(); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, ( + ffi_bridge.NIAllTypesBridge? everything, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAllTypes response = dartApi!.echoNIAllTypes( + NIAllTypes.fromFfi(everything)!, + ); + return response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, ( + ffi_bridge.NIAllNullableTypesBridge? everything, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAllNullableTypes? response = dartApi! + .echoNIAllNullableTypes( + NIAllNullableTypes.fromFfi(everything), + ); + return response == null ? null : response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement(builder, ( + NSNumber? aNullableBool, + NSNumber? aNullableInt, + NSString? aNullableString, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAllNullableTypes response = dartApi! + .sendMultipleNullableTypes( + aNullableBool?.boolValue, + aNullableInt?.longValue, + aNullableString?.toDartString(), + ); + return response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, ( + ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? everything, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAllNullableTypesWithoutRecursion? response = dartApi! + .echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion.fromFfi(everything), + ); + return response == null ? null : response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement(builder, ( + NSNumber? aNullableBool, + NSNumber? aNullableInt, + NSString? aNullableString, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAllNullableTypesWithoutRecursion response = dartApi! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool?.boolValue, + aNullableInt?.longValue, + aNullableString?.toDartString(), + ); + return response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoBoolWithABool_error_ + .implement(builder, ( + NSNumber? aBool, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final bool response = dartApi!.echoBool(aBool!.boolValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoIntWithAnInt_error_ + .implement(builder, ( + NSNumber? anInt, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final int response = dartApi!.echoInt(anInt!.longValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoDoubleWithADouble_error_ + .implement(builder, ( + NSNumber? aDouble, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final double response = dartApi!.echoDouble( + aDouble!.doubleValue, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoStringWithAString_error_ + .implement(builder, ( + NSString? aString, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final String response = dartApi!.echoString( + aString!.toDartString(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoUint8ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Uint8List response = dartApi!.echoUint8List( + (_PigeonFfiCodec.readValue(list)! as Uint8List), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoInt32ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int32List response = dartApi!.echoInt32List( + (_PigeonFfiCodec.readValue(list)! as Int32List), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoInt64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int64List response = dartApi!.echoInt64List( + (_PigeonFfiCodec.readValue(list)! as Int64List), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoFloat64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Float64List response = dartApi!.echoFloat64List( + (_PigeonFfiCodec.readValue(list)! as Float64List), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoListWithList_error_ + .implement(builder, ( + NSArray? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List response = dartApi!.echoList( + (_PigeonFfiCodec.readValue(list)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoEnumListWithEnumList_error_ + .implement(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List response = dartApi!.echoEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum)! + as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoClassListWithClassList_error_ + .implement(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List response = dartApi! + .echoClassList( + (_PigeonFfiCodec.readValue(classList)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List response = dartApi!.echoNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum)! + as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List response = dartApi! + .echoNonNullClassList( + (_PigeonFfiCodec.readValue(classList)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_ + .implement(builder, ( + NSDictionary? map, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoMap( + (_PigeonFfiCodec.readValue(map)! as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoStringMap( + (_PigeonFfiCodec.readValue(stringMap)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoIntMapWithIntMap_error_ + .implement(builder, ( + NSDictionary? intMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoIntMap( + (_PigeonFfiCodec.readValue(intMap, int, int)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoEnumMapWithEnumMap_error_ + .implement(builder, ( + NSDictionary? enumMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NIAnEnum, NIAnEnum)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi! + .echoClassMap( + (_PigeonFfiCodec.readValue(classMap, int)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi! + .echoNonNullStringMap( + (_PigeonFfiCodec.readValue(stringMap)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullIntMapWithIntMap_error_ + .implement(builder, ( + NSDictionary? intMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoNonNullIntMap( + (_PigeonFfiCodec.readValue(intMap, int, int)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, ( + NSDictionary? enumMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi! + .echoNonNullEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NIAnEnum, NIAnEnum)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi! + .echoNonNullClassMap( + (_PigeonFfiCodec.readValue(classMap, int)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoEnumWithAnEnum_error_ + .implement(builder, ( + NSNumber? anEnum, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAnEnum response = dartApi!.echoEnum( + (_PigeonFfiCodec.readValue(anEnum, NIAnEnum)! as NIAnEnum), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, ( + NSNumber? anotherEnum, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAnotherEnum response = dartApi!.echoNIAnotherEnum( + (_PigeonFfiCodec.readValue(anotherEnum, NIAnotherEnum)! + as NIAnotherEnum), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableBoolWithABool_error_ + .implement(builder, ( + NSNumber? aBool, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final bool? response = dartApi!.echoNullableBool( + aBool?.boolValue, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntWithAnInt_error_ + .implement(builder, ( + NSNumber? anInt, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final int? response = dartApi!.echoNullableInt( + anInt?.longValue, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, ( + NSNumber? aDouble, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final double? response = dartApi!.echoNullableDouble( + aDouble?.doubleValue, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, ( + NSString? aString, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final String? response = dartApi!.echoNullableString( + aString?.toDartString(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Uint8List? response = dartApi!.echoNullableUint8List( + (_PigeonFfiCodec.readValue(list) as Uint8List?), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int32List? response = dartApi!.echoNullableInt32List( + (_PigeonFfiCodec.readValue(list) as Int32List?), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int64List? response = dartApi!.echoNullableInt64List( + (_PigeonFfiCodec.readValue(list) as Int64List?), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Float64List? response = dartApi!.echoNullableFloat64List( + (_PigeonFfiCodec.readValue(list) as Float64List?), + ); + return _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableListWithList_error_ + .implement(builder, ( + NSArray? list, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List? response = dartApi!.echoNullableList( + (_PigeonFfiCodec.readValue(list) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List? response = dartApi!.echoNullableEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum) + as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableClassList( + (_PigeonFfiCodec.readValue(classList) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum) + as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableNonNullClassList( + (_PigeonFfiCodec.readValue(classList) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableMapWithMap_error_ + .implement(builder, ( + NSDictionary? map, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableMap( + (_PigeonFfiCodec.readValue(map) as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableStringMap( + (_PigeonFfiCodec.readValue(stringMap) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, ( + NSDictionary? intMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableIntMap( + (_PigeonFfiCodec.readValue(intMap, int, int) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, ( + NSDictionary? enumMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableClassMap( + (_PigeonFfiCodec.readValue(classMap, int) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullStringMap( + (_PigeonFfiCodec.readValue(stringMap) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, ( + NSDictionary? intMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullIntMap( + (_PigeonFfiCodec.readValue(intMap, int, int) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, ( + NSDictionary? enumMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullClassMap( + (_PigeonFfiCodec.readValue(classMap, int) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumWithAnEnum_error_ + .implement(builder, ( + NSNumber? anEnum, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAnEnum? response = dartApi!.echoNullableEnum( + (_PigeonFfiCodec.readValue(anEnum, NIAnEnum) as NIAnEnum?), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, ( + NSNumber? anotherEnum, + ffi_bridge.NiTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NIAnotherEnum? response = dartApi! + .echoAnotherNullableEnum( + (_PigeonFfiCodec.readValue(anotherEnum, NIAnotherEnum) + as NIAnotherEnum?), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi!.noopAsync().then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid$CallExtension( + completionHandler, + ).call(); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid$CallExtension( + completionHandler, + ).call(); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid$CallExtension( + completionHandler, + ).call(); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid$CallExtension( + completionHandler, + ).call(); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi!.throwFlutterErrorAsync().then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + generic: true, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NIAllTypesBridge? everything, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNIAllTypes(NIAllTypes.fromFfi(everything)!) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NIAllTypesBridge$CallExtension( + completionHandler, + ).call(response.toFfi()); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NIAllTypesBridge$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NIAllTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NIAllTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NIAllNullableTypesBridge? everything, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes.fromFfi(everything), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(response == null ? null : response.toFfi()); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NIAllNullableTypesWithoutRecursionBridge? everything, + ffi_bridge.NiTestsError errorOut, + ObjCBlock< + Void Function( + ffi_bridge.NIAllNullableTypesWithoutRecursionBridge?, + ) + > + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion.fromFfi(everything), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(response == null ? null : response.toFfi()); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aBool, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncBool(aBool!.boolValue) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anInt, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncInt(anInt!.longValue) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aDouble, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncDouble(aDouble!.doubleValue) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsListener(builder, ( + NSString? aString, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncString(aString!.toDartString()) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncUint8List( + (_PigeonFfiCodec.readValue(list)! as Uint8List), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncInt32List( + (_PigeonFfiCodec.readValue(list)! as Int32List), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncInt64List( + (_PigeonFfiCodec.readValue(list)! as Int64List), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncFloat64List( + (_PigeonFfiCodec.readValue(list)! as Float64List), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, ( + NSObject? anObject, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncObject(_PigeonFfiCodec.readValue(anObject)!) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + generic: true, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncList( + (_PigeonFfiCodec.readValue(list)! as List) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum)! + as List) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncClassList( + (_PigeonFfiCodec.readValue(classList)! as List) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum)! + as List) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNonNullClassList( + (_PigeonFfiCodec.readValue(classList)! as List) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? map, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncMap( + (_PigeonFfiCodec.readValue(map)! as Map) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? stringMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncStringMap( + (_PigeonFfiCodec.readValue(stringMap)! + as Map) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? intMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncIntMap( + (_PigeonFfiCodec.readValue(intMap, int, int)! + as Map) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? enumMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NIAnEnum, NIAnEnum)! + as Map) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? classMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncClassMap( + (_PigeonFfiCodec.readValue(classMap, int)! + as Map) + .cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anEnum, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncEnum( + (_PigeonFfiCodec.readValue(anEnum, NIAnEnum)! + as NIAnEnum), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anotherEnum, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAnotherAsyncEnum( + (_PigeonFfiCodec.readValue(anotherEnum, NIAnotherEnum)! + as NIAnotherEnum), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aBool, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableBool(aBool?.boolValue) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anInt, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableInt(anInt?.longValue) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aDouble, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableDouble(aDouble?.doubleValue) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsListener(builder, ( + NSString? aString, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableString(aString?.toDartString()) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSString$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableUint8List( + (_PigeonFfiCodec.readValue(list) as Uint8List?), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableInt32List( + (_PigeonFfiCodec.readValue(list) as Int32List?), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableInt64List( + (_PigeonFfiCodec.readValue(list) as Int64List?), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NiTestsPigeonTypedData? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableFloat64List( + (_PigeonFfiCodec.readValue(list) as Float64List?), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue< + ffi_bridge.NiTestsPigeonTypedData? + >(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, ( + NSObject? anObject, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableObject( + _PigeonFfiCodec.readValue(anObject), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + generic: true, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSObject$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? list, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableList( + (_PigeonFfiCodec.readValue(list) as List?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum) + as List?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableClassList( + (_PigeonFfiCodec.readValue(classList) as List?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NIAnEnum) + as List?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNonNullClassList( + (_PigeonFfiCodec.readValue(classList) as List?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSArray$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? map, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableMap( + (_PigeonFfiCodec.readValue(map) as Map?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? stringMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableStringMap( + (_PigeonFfiCodec.readValue(stringMap) + as Map?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? intMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableIntMap( + (_PigeonFfiCodec.readValue(intMap, int, int) + as Map?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? enumMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NIAnEnum, NIAnEnum) + as Map?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? classMap, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableClassMap( + (_PigeonFfiCodec.readValue(classMap, int) + as Map?) + ?.cast(), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue(response), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSDictionary$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anEnum, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableEnum( + (_PigeonFfiCodec.readValue(anEnum, NIAnEnum) + as NIAnEnum?), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anotherEnum, + ffi_bridge.NiTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAnotherAsyncNullableEnum( + (_PigeonFfiCodec.readValue(anotherEnum, NIAnotherEnum) + as NIAnotherEnum?), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(_PigeonFfiCodec.writeValue(response)); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NIFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NSNumber$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + builder.addProtocol( + ffi_bridge.NIFlutterIntegrationCoreApiBridge$Builder.$protocol, + ); + final ffi_bridge.NIFlutterIntegrationCoreApiBridge impl = + ffi_bridge.NIFlutterIntegrationCoreApiBridge.as(builder.build()); + ffi_bridge.NIFlutterIntegrationCoreApiRegistrar.registerInstanceWithApi( + impl, + name: NSString(name), + ); + } + return api; + } + + @override + void noop() { + if (dartApi != null) { + dartApi!.noop(); + return; + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JObject? throwFlutterError() { + if (dartApi != null) { + final Object? response = dartApi!.throwFlutterError(); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JObject? throwError() { + if (dartApi != null) { + final Object? response = dartApi!.throwError(); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + void throwErrorFromVoid() { + if (dartApi != null) { + dartApi!.throwErrorFromVoid(); + return; + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAllTypes echoNIAllTypes(jni_bridge.NIAllTypes everything) { + if (dartApi != null) { + final NIAllTypes response = dartApi!.echoNIAllTypes( + NIAllTypes.fromJni(everything)!, + ); + return response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAllNullableTypes? echoNIAllNullableTypes( + jni_bridge.NIAllNullableTypes? everything, + ) { + if (dartApi != null) { + final NIAllNullableTypes? response = dartApi!.echoNIAllNullableTypes( + NIAllNullableTypes.fromJni(everything), + ); + return response == null ? null : response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAllNullableTypes sendMultipleNullableTypes( + JBoolean? aNullableBool, + JLong? aNullableInt, + JString? aNullableString, + ) { + if (dartApi != null) { + final NIAllNullableTypes response = dartApi!.sendMultipleNullableTypes( + aNullableBool?.toDartBool(releaseOriginal: true), + aNullableInt?.toDartInt(releaseOriginal: true), + aNullableString?.toDartString(releaseOriginal: true), + ); + return response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAllNullableTypesWithoutRecursion? + echoNIAllNullableTypesWithoutRecursion( + jni_bridge.NIAllNullableTypesWithoutRecursion? everything, + ) { + if (dartApi != null) { + final NIAllNullableTypesWithoutRecursion? response = dartApi! + .echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion.fromJni(everything), + ); + return response == null ? null : response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAllNullableTypesWithoutRecursion + sendMultipleNullableTypesWithoutRecursion( + JBoolean? aNullableBool, + JLong? aNullableInt, + JString? aNullableString, + ) { + if (dartApi != null) { + final NIAllNullableTypesWithoutRecursion response = dartApi! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool?.toDartBool(releaseOriginal: true), + aNullableInt?.toDartInt(releaseOriginal: true), + aNullableString?.toDartString(releaseOriginal: true), + ); + return response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + bool echoBool(bool aBool) { + if (dartApi != null) { + final bool response = dartApi!.echoBool(aBool); + return response; + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + int echoInt(int anInt) { + if (dartApi != null) { + final int response = dartApi!.echoInt(anInt); + return response; + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + double echoDouble(double aDouble) { + if (dartApi != null) { + final double response = dartApi!.echoDouble(aDouble); + return response; + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JString echoString(JString aString) { + if (dartApi != null) { + final String response = dartApi!.echoString( + aString.toDartString(releaseOriginal: true), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JByteArray echoUint8List(JByteArray list) { + if (dartApi != null) { + final Uint8List response = dartApi!.echoUint8List( + (_PigeonJniCodec.readValue(list)! as Uint8List), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JIntArray echoInt32List(JIntArray list) { + if (dartApi != null) { + final Int32List response = dartApi!.echoInt32List( + (_PigeonJniCodec.readValue(list)! as Int32List), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JLongArray echoInt64List(JLongArray list) { + if (dartApi != null) { + final Int64List response = dartApi!.echoInt64List( + (_PigeonJniCodec.readValue(list)! as Int64List), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JDoubleArray echoFloat64List(JDoubleArray list) { + if (dartApi != null) { + final Float64List response = dartApi!.echoFloat64List( + (_PigeonJniCodec.readValue(list)! as Float64List), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList echoList(JList list) { + if (dartApi != null) { + final List response = dartApi!.echoList( + (_PigeonJniCodec.readValue(list)! as List).cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList echoEnumList( + JList enumList, + ) { + if (dartApi != null) { + final List response = dartApi!.echoEnumList( + (_PigeonJniCodec.readValue(enumList)! as List) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList echoClassList( + JList classList, + ) { + if (dartApi != null) { + final List response = dartApi!.echoClassList( + (_PigeonJniCodec.readValue(classList)! as List) + .cast(), + ); + return _PigeonJniCodec.writeValue>( + response, + ); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList echoNonNullEnumList( + JList enumList, + ) { + if (dartApi != null) { + final List response = dartApi!.echoNonNullEnumList( + (_PigeonJniCodec.readValue(enumList)! as List) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList echoNonNullClassList( + JList classList, + ) { + if (dartApi != null) { + final List response = dartApi!.echoNonNullClassList( + (_PigeonJniCodec.readValue(classList)! as List) + .cast(), + ); + return _PigeonJniCodec.writeValue>( + response, + ); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoMap(JMap map) { + if (dartApi != null) { + final Map response = dartApi!.echoMap( + (_PigeonJniCodec.readValue(map)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoStringMap(JMap stringMap) { + if (dartApi != null) { + final Map response = dartApi!.echoStringMap( + (_PigeonJniCodec.readValue(stringMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoIntMap(JMap intMap) { + if (dartApi != null) { + final Map response = dartApi!.echoIntMap( + (_PigeonJniCodec.readValue(intMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoEnumMap( + JMap enumMap, + ) { + if (dartApi != null) { + final Map response = dartApi!.echoEnumMap( + (_PigeonJniCodec.readValue(enumMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue< + JMap + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoClassMap( + JMap classMap, + ) { + if (dartApi != null) { + final Map response = dartApi!.echoClassMap( + (_PigeonJniCodec.readValue(classMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue< + JMap + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoNonNullStringMap( + JMap stringMap, + ) { + if (dartApi != null) { + final Map response = dartApi!.echoNonNullStringMap( + (_PigeonJniCodec.readValue(stringMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoNonNullIntMap(JMap intMap) { + if (dartApi != null) { + final Map response = dartApi!.echoNonNullIntMap( + (_PigeonJniCodec.readValue(intMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoNonNullEnumMap( + JMap enumMap, + ) { + if (dartApi != null) { + final Map response = dartApi!.echoNonNullEnumMap( + (_PigeonJniCodec.readValue(enumMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue< + JMap + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap echoNonNullClassMap( + JMap classMap, + ) { + if (dartApi != null) { + final Map response = dartApi! + .echoNonNullClassMap( + (_PigeonJniCodec.readValue(classMap)! as Map) + .cast(), + ); + return _PigeonJniCodec.writeValue< + JMap + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAnEnum echoEnum(jni_bridge.NIAnEnum anEnum) { + if (dartApi != null) { + final NIAnEnum response = dartApi!.echoEnum(NIAnEnum.fromJni(anEnum)!); + return response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAnotherEnum echoNIAnotherEnum( + jni_bridge.NIAnotherEnum anotherEnum, + ) { + if (dartApi != null) { + final NIAnotherEnum response = dartApi!.echoNIAnotherEnum( + NIAnotherEnum.fromJni(anotherEnum)!, + ); + return response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JBoolean? echoNullableBool(JBoolean? aBool) { + if (dartApi != null) { + final bool? response = dartApi!.echoNullableBool( + aBool?.toDartBool(releaseOriginal: true), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JLong? echoNullableInt(JLong? anInt) { + if (dartApi != null) { + final int? response = dartApi!.echoNullableInt( + anInt?.toDartInt(releaseOriginal: true), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JDouble? echoNullableDouble(JDouble? aDouble) { + if (dartApi != null) { + final double? response = dartApi!.echoNullableDouble( + aDouble?.toDartDouble(releaseOriginal: true), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JString? echoNullableString(JString? aString) { + if (dartApi != null) { + final String? response = dartApi!.echoNullableString( + aString?.toDartString(releaseOriginal: true), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JByteArray? echoNullableUint8List(JByteArray? list) { + if (dartApi != null) { + final Uint8List? response = dartApi!.echoNullableUint8List( + (_PigeonJniCodec.readValue(list) as Uint8List?), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JIntArray? echoNullableInt32List(JIntArray? list) { + if (dartApi != null) { + final Int32List? response = dartApi!.echoNullableInt32List( + (_PigeonJniCodec.readValue(list) as Int32List?), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JLongArray? echoNullableInt64List(JLongArray? list) { + if (dartApi != null) { + final Int64List? response = dartApi!.echoNullableInt64List( + (_PigeonJniCodec.readValue(list) as Int64List?), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JDoubleArray? echoNullableFloat64List(JDoubleArray? list) { + if (dartApi != null) { + final Float64List? response = dartApi!.echoNullableFloat64List( + (_PigeonJniCodec.readValue(list) as Float64List?), + ); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList? echoNullableList(JList? list) { + if (dartApi != null) { + final List? response = dartApi!.echoNullableList( + (_PigeonJniCodec.readValue(list) as List?)?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList? echoNullableEnumList( + JList? enumList, + ) { + if (dartApi != null) { + final List? response = dartApi!.echoNullableEnumList( + (_PigeonJniCodec.readValue(enumList) as List?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList? echoNullableClassList( + JList? classList, + ) { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableClassList( + (_PigeonJniCodec.readValue(classList) as List?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>( + response, + ); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList? echoNullableNonNullEnumList( + JList? enumList, + ) { + if (dartApi != null) { + final List? response = dartApi!.echoNullableNonNullEnumList( + (_PigeonJniCodec.readValue(enumList) as List?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JList? echoNullableNonNullClassList( + JList? classList, + ) { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableNonNullClassList( + (_PigeonJniCodec.readValue(classList) as List?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>( + response, + ); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableMap(JMap? map) { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableMap( + (_PigeonJniCodec.readValue(map) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableStringMap( + JMap? stringMap, + ) { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableStringMap( + (_PigeonJniCodec.readValue(stringMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableIntMap(JMap? intMap) { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableIntMap( + (_PigeonJniCodec.readValue(intMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableEnumMap( + JMap? enumMap, + ) { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableEnumMap( + (_PigeonJniCodec.readValue(enumMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue< + JMap? + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableClassMap( + JMap? classMap, + ) { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableClassMap( + (_PigeonJniCodec.readValue(classMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue< + JMap? + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableNonNullStringMap( + JMap? stringMap, + ) { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullStringMap( + (_PigeonJniCodec.readValue(stringMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableNonNullIntMap(JMap? intMap) { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableNonNullIntMap( + (_PigeonJniCodec.readValue(intMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue?>(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableNonNullEnumMap( + JMap? enumMap, + ) { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullEnumMap( + (_PigeonJniCodec.readValue(enumMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue< + JMap? + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JMap? echoNullableNonNullClassMap( + JMap? classMap, + ) { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullClassMap( + (_PigeonJniCodec.readValue(classMap) as Map?) + ?.cast(), + ); + return _PigeonJniCodec.writeValue< + JMap? + >(response); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAnEnum? echoNullableEnum(jni_bridge.NIAnEnum? anEnum) { + if (dartApi != null) { + final NIAnEnum? response = dartApi!.echoNullableEnum( + NIAnEnum.fromJni(anEnum), + ); + return response == null ? null : response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NIAnotherEnum? echoAnotherNullableEnum( + jni_bridge.NIAnotherEnum? anotherEnum, + ) { + if (dartApi != null) { + final NIAnotherEnum? response = dartApi!.echoAnotherNullableEnum( + NIAnotherEnum.fromJni(anotherEnum), + ); + return response == null ? null : response.toJni(); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future noopAsync() { + if (dartApi != null) { + return dartApi!.noopAsync().then((response) { + return _PigeonJniCodec._kotlinUnit; + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future throwFlutterErrorAsync() { + if (dartApi != null) { + return dartApi!.throwFlutterErrorAsync().then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNIAllTypes( + jni_bridge.NIAllTypes everything, + ) { + if (dartApi != null) { + return dartApi!.echoAsyncNIAllTypes(NIAllTypes.fromJni(everything)!).then( + (response) { + return response.toJni(); + }, + ); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableNIAllNullableTypes( + jni_bridge.NIAllNullableTypes? everything, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes.fromJni(everything), + ) + .then((response) { + return response == null ? null : response.toJni(); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + jni_bridge.NIAllNullableTypesWithoutRecursion? everything, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion.fromJni(everything), + ) + .then((response) { + return response == null ? null : response.toJni(); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncBool(bool aBool) { + if (dartApi != null) { + return dartApi!.echoAsyncBool(aBool).then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncInt(int anInt) { + if (dartApi != null) { + return dartApi!.echoAsyncInt(anInt).then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncDouble(double aDouble) { + if (dartApi != null) { + return dartApi!.echoAsyncDouble(aDouble).then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncString(JString aString) { + if (dartApi != null) { + return dartApi! + .echoAsyncString(aString.toDartString(releaseOriginal: true)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncUint8List(JByteArray list) { + if (dartApi != null) { + return dartApi! + .echoAsyncUint8List((_PigeonJniCodec.readValue(list)! as Uint8List)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncInt32List(JIntArray list) { + if (dartApi != null) { + return dartApi! + .echoAsyncInt32List((_PigeonJniCodec.readValue(list)! as Int32List)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncInt64List(JLongArray list) { + if (dartApi != null) { + return dartApi! + .echoAsyncInt64List((_PigeonJniCodec.readValue(list)! as Int64List)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncFloat64List(JDoubleArray list) { + if (dartApi != null) { + return dartApi! + .echoAsyncFloat64List( + (_PigeonJniCodec.readValue(list)! as Float64List), + ) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncObject(JObject anObject) { + if (dartApi != null) { + return dartApi! + .echoAsyncObject(_PigeonJniCodec.readValue(anObject)!) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncList(JList list) { + if (dartApi != null) { + return dartApi! + .echoAsyncList( + (_PigeonJniCodec.readValue(list)! as List).cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue>(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncEnumList( + JList enumList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncEnumList( + (_PigeonJniCodec.readValue(enumList)! as List) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncClassList( + JList classList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncClassList( + (_PigeonJniCodec.readValue(classList)! as List) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JList + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncNonNullEnumList( + JList enumList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNonNullEnumList( + (_PigeonJniCodec.readValue(enumList)! as List) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncNonNullClassList( + JList classList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNonNullClassList( + (_PigeonJniCodec.readValue(classList)! as List) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JList + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncMap(JMap map) { + if (dartApi != null) { + return dartApi! + .echoAsyncMap( + (_PigeonJniCodec.readValue(map)! as Map) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncStringMap( + JMap stringMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncStringMap( + (_PigeonJniCodec.readValue(stringMap)! as Map) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncIntMap(JMap intMap) { + if (dartApi != null) { + return dartApi! + .echoAsyncIntMap( + (_PigeonJniCodec.readValue(intMap)! as Map) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue>(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncEnumMap( + JMap enumMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncEnumMap( + (_PigeonJniCodec.readValue(enumMap)! as Map) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JMap + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future> echoAsyncClassMap( + JMap classMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncClassMap( + (_PigeonJniCodec.readValue(classMap)! as Map) + .cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JMap + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncEnum(jni_bridge.NIAnEnum anEnum) { + if (dartApi != null) { + return dartApi!.echoAsyncEnum(NIAnEnum.fromJni(anEnum)!).then((response) { + return response.toJni(); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAnotherAsyncEnum( + jni_bridge.NIAnotherEnum anotherEnum, + ) { + if (dartApi != null) { + return dartApi! + .echoAnotherAsyncEnum(NIAnotherEnum.fromJni(anotherEnum)!) + .then((response) { + return response.toJni(); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableBool(JBoolean? aBool) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableBool(aBool?.toDartBool(releaseOriginal: true)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableInt(JLong? anInt) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableInt(anInt?.toDartInt(releaseOriginal: true)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableDouble(JDouble? aDouble) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableDouble(aDouble?.toDartDouble(releaseOriginal: true)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableString(JString? aString) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableString(aString?.toDartString(releaseOriginal: true)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableUint8List(JByteArray? list) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableUint8List( + (_PigeonJniCodec.readValue(list) as Uint8List?), + ) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableInt32List(JIntArray? list) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableInt32List( + (_PigeonJniCodec.readValue(list) as Int32List?), + ) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableInt64List(JLongArray? list) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableInt64List( + (_PigeonJniCodec.readValue(list) as Int64List?), + ) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableFloat64List(JDoubleArray? list) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableFloat64List( + (_PigeonJniCodec.readValue(list) as Float64List?), + ) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableObject(JObject? anObject) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableObject(_PigeonJniCodec.readValue(anObject)) + .then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableList(JList? list) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableList( + (_PigeonJniCodec.readValue(list) as List?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue?>(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableEnumList( + JList? enumList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableEnumList( + (_PigeonJniCodec.readValue(enumList) as List?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue?>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableClassList( + JList? classList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableClassList( + (_PigeonJniCodec.readValue(classList) as List?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JList? + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableNonNullEnumList( + JList? enumList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableNonNullEnumList( + (_PigeonJniCodec.readValue(enumList) as List?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue?>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> + echoAsyncNullableNonNullClassList( + JList? classList, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableNonNullClassList( + (_PigeonJniCodec.readValue(classList) as List?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JList? + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableMap( + JMap? map, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableMap( + (_PigeonJniCodec.readValue(map) as Map?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue?>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableStringMap( + JMap? stringMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableStringMap( + (_PigeonJniCodec.readValue(stringMap) as Map?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue?>( + response, + ); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> echoAsyncNullableIntMap( + JMap? intMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableIntMap( + (_PigeonJniCodec.readValue(intMap) as Map?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue?>(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> + echoAsyncNullableEnumMap( + JMap? enumMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableEnumMap( + (_PigeonJniCodec.readValue(enumMap) as Map?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JMap? + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future?> + echoAsyncNullableClassMap( + JMap? classMap, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableClassMap( + (_PigeonJniCodec.readValue(classMap) as Map?) + ?.cast(), + ) + .then((response) { + return _PigeonJniCodec.writeValue< + JMap? + >(response); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableEnum( + jni_bridge.NIAnEnum? anEnum, + ) { + if (dartApi != null) { + return dartApi!.echoAsyncNullableEnum(NIAnEnum.fromJni(anEnum)).then(( + response, + ) { + return response == null ? null : response.toJni(); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAnotherAsyncNullableEnum( + jni_bridge.NIAnotherEnum? anotherEnum, + ) { + if (dartApi != null) { + return dartApi! + .echoAnotherAsyncNullableEnum(NIAnotherEnum.fromJni(anotherEnum)) + .then((response) { + return response == null ? null : response.toJni(); + }); + } else { + throw ArgumentError('NIFlutterIntegrationCoreApi was not registered.'); + } + } +} + +abstract class NIFlutterIntegrationCoreApi { + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + void noop(); + + /// Returns a Flutter error, to test error handling. + Object? throwFlutterError(); + + /// Responds with an error from an async function returning a value. + Object? throwError(); + + /// Responds with an error from an async void function. + void throwErrorFromVoid(); + + /// Returns the passed object, to test serialization and deserialization. + NIAllTypes echoNIAllTypes(NIAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + NIAllNullableTypes? echoNIAllNullableTypes(NIAllNullableTypes? everything); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + NIAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns the passed object, to test serialization and deserialization. + NIAllNullableTypesWithoutRecursion? echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns the passed boolean, to test serialization and deserialization. + bool echoBool(bool aBool); + + /// Returns the passed int, to test serialization and deserialization. + int echoInt(int anInt); + + /// Returns the passed double, to test serialization and deserialization. + double echoDouble(double aDouble); + + /// Returns the passed string, to test serialization and deserialization. + String echoString(String aString); + + /// Returns the passed byte list, to test serialization and deserialization. + Uint8List echoUint8List(Uint8List list); + + /// Returns the passed int32 list, to test serialization and deserialization. + Int32List echoInt32List(Int32List list); + + /// Returns the passed int64 list, to test serialization and deserialization. + Int64List echoInt64List(Int64List list); + + /// Returns the passed float64 list, to test serialization and deserialization. + Float64List echoFloat64List(Float64List list); + + /// Returns the passed list, to test serialization and deserialization. + List echoList(List list); + + /// Returns the passed list, to test serialization and deserialization. + List echoEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + List echoClassList(List classList); + + /// Returns the passed list, to test serialization and deserialization. + List echoNonNullEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + List echoNonNullClassList( + List classList, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map echoMap(Map map); + + /// Returns the passed map, to test serialization and deserialization. + Map echoStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + Map echoIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + Map echoEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + Map echoClassMap( + Map classMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map echoNonNullStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + Map echoNonNullIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + Map echoNonNullEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + Map echoNonNullClassMap( + Map classMap, + ); + + /// Returns the passed enum to test serialization and deserialization. + NIAnEnum echoEnum(NIAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + NIAnotherEnum echoNIAnotherEnum(NIAnotherEnum anotherEnum); + + /// Returns the passed boolean, to test serialization and deserialization. + bool? echoNullableBool(bool? aBool); + + /// Returns the passed int, to test serialization and deserialization. + int? echoNullableInt(int? anInt); + + /// Returns the passed double, to test serialization and deserialization. + double? echoNullableDouble(double? aDouble); + + /// Returns the passed string, to test serialization and deserialization. + String? echoNullableString(String? aString); + + /// Returns the passed byte list, to test serialization and deserialization. + Uint8List? echoNullableUint8List(Uint8List? list); + + /// Returns the passed int32 list, to test serialization and deserialization. + Int32List? echoNullableInt32List(Int32List? list); + + /// Returns the passed int64 list, to test serialization and deserialization. + Int64List? echoNullableInt64List(Int64List? list); + + /// Returns the passed float64 list, to test serialization and deserialization. + Float64List? echoNullableFloat64List(Float64List? list); + + /// Returns the passed list, to test serialization and deserialization. + List? echoNullableList(List? list); + + /// Returns the passed list, to test serialization and deserialization. + List? echoNullableEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + List? echoNullableClassList( + List? classList, + ); + + /// Returns the passed list, to test serialization and deserialization. + List? echoNullableNonNullEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + List? echoNullableNonNullClassList( + List? classList, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableMap(Map? map); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableClassMap( + Map? classMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableNonNullStringMap( + Map? stringMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableNonNullIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableNonNullEnumMap( + Map? enumMap, + ); + + /// Returns the passed map, to test serialization and deserialization. + Map? echoNullableNonNullClassMap( + Map? classMap, + ); + + /// Returns the passed enum to test serialization and deserialization. + NIAnEnum? echoNullableEnum(NIAnEnum? anEnum); + + /// Returns the passed enum to test serialization and deserialization. + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? anotherEnum); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + Future noopAsync(); + + Future throwFlutterErrorAsync(); + + Future echoAsyncNIAllTypes(NIAllTypes everything); + + Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? everything, + ); + + Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? everything, + ); + + Future echoAsyncBool(bool aBool); + + Future echoAsyncInt(int anInt); + + Future echoAsyncDouble(double aDouble); + + Future echoAsyncString(String aString); + + Future echoAsyncUint8List(Uint8List list); + + Future echoAsyncInt32List(Int32List list); + + Future echoAsyncInt64List(Int64List list); + + Future echoAsyncFloat64List(Float64List list); + + Future echoAsyncObject(Object anObject); + + Future> echoAsyncList(List list); + + Future> echoAsyncEnumList(List enumList); + + Future> echoAsyncClassList( + List classList, + ); + + Future> echoAsyncNonNullEnumList(List enumList); + + Future> echoAsyncNonNullClassList( + List classList, + ); + + Future> echoAsyncMap(Map map); + + Future> echoAsyncStringMap( + Map stringMap, + ); + + Future> echoAsyncIntMap(Map intMap); + + Future> echoAsyncEnumMap( + Map enumMap, + ); + + Future> echoAsyncClassMap( + Map classMap, + ); + + Future echoAsyncEnum(NIAnEnum anEnum); + + Future echoAnotherAsyncEnum(NIAnotherEnum anotherEnum); + + Future echoAsyncNullableBool(bool? aBool); + + Future echoAsyncNullableInt(int? anInt); + + Future echoAsyncNullableDouble(double? aDouble); + + Future echoAsyncNullableString(String? aString); + + Future echoAsyncNullableUint8List(Uint8List? list); + + Future echoAsyncNullableInt32List(Int32List? list); + + Future echoAsyncNullableInt64List(Int64List? list); + + Future echoAsyncNullableFloat64List(Float64List? list); + + Future echoAsyncNullableObject(Object? anObject); + + Future?> echoAsyncNullableList(List? list); + + Future?> echoAsyncNullableEnumList(List? enumList); + + Future?> echoAsyncNullableClassList( + List? classList, + ); + + Future?> echoAsyncNullableNonNullEnumList( + List? enumList, + ); + + Future?> echoAsyncNullableNonNullClassList( + List? classList, + ); + + Future?> echoAsyncNullableMap( + Map? map, + ); + + Future?> echoAsyncNullableStringMap( + Map? stringMap, + ); + + Future?> echoAsyncNullableIntMap(Map? intMap); + + Future?> echoAsyncNullableEnumMap( + Map? enumMap, + ); + + Future?> echoAsyncNullableClassMap( + Map? classMap, + ); + + Future echoAsyncNullableEnum(NIAnEnum? anEnum); + + Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? anotherEnum, + ); + + static void setUp( + NIFlutterIntegrationCoreApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + if (Platform.isAndroid && api != null) { + NIFlutterIntegrationCoreApiRegistrar().register( + api, + name: messageChannelSuffix.isEmpty + ? defaultInstanceName + : messageChannelSuffix, + ); + } + + if ((Platform.isIOS || Platform.isMacOS) && api != null) { + NIFlutterIntegrationCoreApiRegistrar().register( + api, + name: messageChannelSuffix.isEmpty + ? defaultInstanceName + : messageChannelSuffix, + ); + } + + messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.noop$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.noop(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.throwFlutterError$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + final Object? output = api.throwFlutterError(); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.throwError$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + final Object? output = api.throwError(); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.throwErrorFromVoid$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.throwErrorFromVoid(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNIAllTypes$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAllTypes arg_everything = args[0]! as NIAllTypes; + try { + final NIAllTypes output = api.echoNIAllTypes(arg_everything); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNIAllNullableTypes$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAllNullableTypes? arg_everything = + args[0] as NIAllNullableTypes?; + try { + final NIAllNullableTypes? output = api.echoNIAllNullableTypes( + arg_everything, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.sendMultipleNullableTypes$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final bool? arg_aNullableBool = args[0] as bool?; + final int? arg_aNullableInt = args[1] as int?; + final String? arg_aNullableString = args[2] as String?; + try { + final NIAllNullableTypes output = api.sendMultipleNullableTypes( + arg_aNullableBool, + arg_aNullableInt, + arg_aNullableString, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNIAllNullableTypesWithoutRecursion$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAllNullableTypesWithoutRecursion? arg_everything = + args[0] as NIAllNullableTypesWithoutRecursion?; + try { + final NIAllNullableTypesWithoutRecursion? output = api + .echoNIAllNullableTypesWithoutRecursion(arg_everything); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.sendMultipleNullableTypesWithoutRecursion$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final bool? arg_aNullableBool = args[0] as bool?; + final int? arg_aNullableInt = args[1] as int?; + final String? arg_aNullableString = args[2] as String?; + try { + final NIAllNullableTypesWithoutRecursion output = api + .sendMultipleNullableTypesWithoutRecursion( + arg_aNullableBool, + arg_aNullableInt, + arg_aNullableString, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoBool$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final bool arg_aBool = args[0]! as bool; + try { + final bool output = api.echoBool(arg_aBool); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoInt$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final int arg_anInt = args[0]! as int; + try { + final int output = api.echoInt(arg_anInt); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoDouble$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final double arg_aDouble = args[0]! as double; + try { + final double output = api.echoDouble(arg_aDouble); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoString$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final String arg_aString = args[0]! as String; + try { + final String output = api.echoString(arg_aString); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoUint8List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Uint8List arg_list = args[0]! as Uint8List; + try { + final Uint8List output = api.echoUint8List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoInt32List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int32List arg_list = args[0]! as Int32List; + try { + final Int32List output = api.echoInt32List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoInt64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int64List arg_list = args[0]! as Int64List; + try { + final Int64List output = api.echoInt64List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoFloat64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Float64List arg_list = args[0]! as Float64List; + try { + final Float64List output = api.echoFloat64List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_list = args[0]! as List; + try { + final List output = api.echoList(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_enumList = (args[0]! as List) + .cast(); + try { + final List output = api.echoEnumList(arg_enumList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_classList = + (args[0]! as List).cast(); + try { + final List output = api.echoClassList( + arg_classList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNonNullEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_enumList = (args[0]! as List) + .cast(); + try { + final List output = api.echoNonNullEnumList(arg_enumList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNonNullClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_classList = + (args[0]! as List).cast(); + try { + final List output = api.echoNonNullClassList( + arg_classList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_map = + args[0]! as Map; + try { + final Map output = api.echoMap(arg_map); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoStringMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_stringMap = + (args[0]! as Map).cast(); + try { + final Map output = api.echoStringMap( + arg_stringMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoIntMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_intMap = (args[0]! as Map) + .cast(); + try { + final Map output = api.echoIntMap(arg_intMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoEnumMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_enumMap = + (args[0]! as Map).cast(); + try { + final Map output = api.echoEnumMap( + arg_enumMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoClassMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_classMap = + (args[0]! as Map) + .cast(); + try { + final Map output = api.echoClassMap( + arg_classMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNonNullStringMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_stringMap = + (args[0]! as Map).cast(); + try { + final Map output = api.echoNonNullStringMap( + arg_stringMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNonNullIntMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_intMap = (args[0]! as Map) + .cast(); + try { + final Map output = api.echoNonNullIntMap(arg_intMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNonNullEnumMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_enumMap = + (args[0]! as Map).cast(); + try { + final Map output = api.echoNonNullEnumMap( + arg_enumMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNonNullClassMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_classMap = + (args[0]! as Map) + .cast(); + try { + final Map output = api.echoNonNullClassMap( + arg_classMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnEnum arg_anEnum = args[0]! as NIAnEnum; + try { + final NIAnEnum output = api.echoEnum(arg_anEnum); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNIAnotherEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnotherEnum arg_anotherEnum = args[0]! as NIAnotherEnum; + try { + final NIAnotherEnum output = api.echoNIAnotherEnum(arg_anotherEnum); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableBool$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final bool? arg_aBool = args[0] as bool?; + try { + final bool? output = api.echoNullableBool(arg_aBool); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableInt$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final int? arg_anInt = args[0] as int?; + try { + final int? output = api.echoNullableInt(arg_anInt); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableDouble$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final double? arg_aDouble = args[0] as double?; + try { + final double? output = api.echoNullableDouble(arg_aDouble); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableString$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final String? arg_aString = args[0] as String?; + try { + final String? output = api.echoNullableString(arg_aString); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableUint8List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Uint8List? arg_list = args[0] as Uint8List?; + try { + final Uint8List? output = api.echoNullableUint8List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableInt32List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int32List? arg_list = args[0] as Int32List?; + try { + final Int32List? output = api.echoNullableInt32List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableInt64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int64List? arg_list = args[0] as Int64List?; + try { + final Int64List? output = api.echoNullableInt64List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableFloat64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Float64List? arg_list = args[0] as Float64List?; + try { + final Float64List? output = api.echoNullableFloat64List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_list = args[0] as List?; + try { + final List? output = api.echoNullableList(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_enumList = (args[0] as List?) + ?.cast(); + try { + final List? output = api.echoNullableEnumList( + arg_enumList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_classList = + (args[0] as List?)?.cast(); + try { + final List? output = api.echoNullableClassList( + arg_classList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableNonNullEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_enumList = (args[0] as List?) + ?.cast(); + try { + final List? output = api.echoNullableNonNullEnumList( + arg_enumList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableNonNullClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_classList = + (args[0] as List?)?.cast(); + try { + final List? output = api + .echoNullableNonNullClassList(arg_classList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_map = + args[0] as Map?; + try { + final Map? output = api.echoNullableMap(arg_map); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableStringMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_stringMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = api.echoNullableStringMap( + arg_stringMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableIntMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_intMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = api.echoNullableIntMap(arg_intMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableEnumMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_enumMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = api.echoNullableEnumMap( + arg_enumMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableClassMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_classMap = + (args[0] as Map?) + ?.cast(); + try { + final Map? output = api + .echoNullableClassMap(arg_classMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableNonNullStringMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_stringMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = api + .echoNullableNonNullStringMap(arg_stringMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableNonNullIntMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_intMap = (args[0] as Map?) + ?.cast(); + try { + final Map? output = api.echoNullableNonNullIntMap( + arg_intMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableNonNullEnumMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_enumMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = api + .echoNullableNonNullEnumMap(arg_enumMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableNonNullClassMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_classMap = + (args[0] as Map?) + ?.cast(); + try { + final Map? output = api + .echoNullableNonNullClassMap(arg_classMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoNullableEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnEnum? arg_anEnum = args[0] as NIAnEnum?; + try { + final NIAnEnum? output = api.echoNullableEnum(arg_anEnum); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAnotherNullableEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnotherEnum? arg_anotherEnum = args[0] as NIAnotherEnum?; + try { + final NIAnotherEnum? output = api.echoAnotherNullableEnum( + arg_anotherEnum, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.noopAsync$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + await api.noopAsync(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.throwFlutterErrorAsync$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + final Object? output = await api.throwFlutterErrorAsync(); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNIAllTypes$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAllTypes arg_everything = args[0]! as NIAllTypes; + try { + final NIAllTypes output = await api.echoAsyncNIAllTypes( + arg_everything, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableNIAllNullableTypes$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAllNullableTypes? arg_everything = + args[0] as NIAllNullableTypes?; + try { + final NIAllNullableTypes? output = await api + .echoAsyncNullableNIAllNullableTypes(arg_everything); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableNIAllNullableTypesWithoutRecursion$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAllNullableTypesWithoutRecursion? arg_everything = + args[0] as NIAllNullableTypesWithoutRecursion?; + try { + final NIAllNullableTypesWithoutRecursion? output = await api + .echoAsyncNullableNIAllNullableTypesWithoutRecursion( + arg_everything, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncBool$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final bool arg_aBool = args[0]! as bool; + try { + final bool output = await api.echoAsyncBool(arg_aBool); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncInt$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final int arg_anInt = args[0]! as int; + try { + final int output = await api.echoAsyncInt(arg_anInt); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncDouble$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final double arg_aDouble = args[0]! as double; + try { + final double output = await api.echoAsyncDouble(arg_aDouble); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncString$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final String arg_aString = args[0]! as String; + try { + final String output = await api.echoAsyncString(arg_aString); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncUint8List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Uint8List arg_list = args[0]! as Uint8List; + try { + final Uint8List output = await api.echoAsyncUint8List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncInt32List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int32List arg_list = args[0]! as Int32List; + try { + final Int32List output = await api.echoAsyncInt32List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncInt64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int64List arg_list = args[0]! as Int64List; + try { + final Int64List output = await api.echoAsyncInt64List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncFloat64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Float64List arg_list = args[0]! as Float64List; + try { + final Float64List output = await api.echoAsyncFloat64List(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncObject$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Object arg_anObject = args[0]!; + try { + final Object output = await api.echoAsyncObject(arg_anObject); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_list = args[0]! as List; + try { + final List output = await api.echoAsyncList(arg_list); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_enumList = (args[0]! as List) + .cast(); + try { + final List output = await api.echoAsyncEnumList( + arg_enumList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_classList = + (args[0]! as List).cast(); + try { + final List output = await api + .echoAsyncClassList(arg_classList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNonNullEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_enumList = (args[0]! as List) + .cast(); + try { + final List output = await api.echoAsyncNonNullEnumList( + arg_enumList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNonNullClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List arg_classList = + (args[0]! as List).cast(); + try { + final List output = await api + .echoAsyncNonNullClassList(arg_classList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_map = + args[0]! as Map; + try { + final Map output = await api.echoAsyncMap( + arg_map, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncStringMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_stringMap = + (args[0]! as Map).cast(); + try { + final Map output = await api.echoAsyncStringMap( + arg_stringMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncIntMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_intMap = (args[0]! as Map) + .cast(); + try { + final Map output = await api.echoAsyncIntMap( + arg_intMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncEnumMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_enumMap = + (args[0]! as Map).cast(); + try { + final Map output = await api.echoAsyncEnumMap( + arg_enumMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncClassMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map arg_classMap = + (args[0]! as Map) + .cast(); + try { + final Map output = await api + .echoAsyncClassMap(arg_classMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnEnum arg_anEnum = args[0]! as NIAnEnum; + try { + final NIAnEnum output = await api.echoAsyncEnum(arg_anEnum); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAnotherAsyncEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnotherEnum arg_anotherEnum = args[0]! as NIAnotherEnum; + try { + final NIAnotherEnum output = await api.echoAnotherAsyncEnum( + arg_anotherEnum, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableBool$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final bool? arg_aBool = args[0] as bool?; + try { + final bool? output = await api.echoAsyncNullableBool(arg_aBool); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableInt$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final int? arg_anInt = args[0] as int?; + try { + final int? output = await api.echoAsyncNullableInt(arg_anInt); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableDouble$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final double? arg_aDouble = args[0] as double?; + try { + final double? output = await api.echoAsyncNullableDouble( + arg_aDouble, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableString$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final String? arg_aString = args[0] as String?; + try { + final String? output = await api.echoAsyncNullableString( + arg_aString, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableUint8List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Uint8List? arg_list = args[0] as Uint8List?; + try { + final Uint8List? output = await api.echoAsyncNullableUint8List( + arg_list, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableInt32List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int32List? arg_list = args[0] as Int32List?; + try { + final Int32List? output = await api.echoAsyncNullableInt32List( + arg_list, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableInt64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Int64List? arg_list = args[0] as Int64List?; + try { + final Int64List? output = await api.echoAsyncNullableInt64List( + arg_list, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableFloat64List$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Float64List? arg_list = args[0] as Float64List?; + try { + final Float64List? output = await api.echoAsyncNullableFloat64List( + arg_list, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableObject$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Object? arg_anObject = args[0]; + try { + final Object? output = await api.echoAsyncNullableObject( + arg_anObject, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_list = args[0] as List?; + try { + final List? output = await api.echoAsyncNullableList( + arg_list, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_enumList = (args[0] as List?) + ?.cast(); + try { + final List? output = await api.echoAsyncNullableEnumList( + arg_enumList, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_classList = + (args[0] as List?)?.cast(); + try { + final List? output = await api + .echoAsyncNullableClassList(arg_classList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableNonNullEnumList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_enumList = (args[0] as List?) + ?.cast(); + try { + final List? output = await api + .echoAsyncNullableNonNullEnumList(arg_enumList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableNonNullClassList$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final List? arg_classList = + (args[0] as List?)?.cast(); + try { + final List? output = await api + .echoAsyncNullableNonNullClassList(arg_classList); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_map = + args[0] as Map?; + try { + final Map? output = await api + .echoAsyncNullableMap(arg_map); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableStringMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_stringMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = await api + .echoAsyncNullableStringMap(arg_stringMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableIntMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_intMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = await api.echoAsyncNullableIntMap( + arg_intMap, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableEnumMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_enumMap = + (args[0] as Map?)?.cast(); + try { + final Map? output = await api + .echoAsyncNullableEnumMap(arg_enumMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableClassMap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final Map? arg_classMap = + (args[0] as Map?) + ?.cast(); + try { + final Map? output = await api + .echoAsyncNullableClassMap(arg_classMap); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAsyncNullableEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnEnum? arg_anEnum = args[0] as NIAnEnum?; + try { + final NIAnEnum? output = await api.echoAsyncNullableEnum( + arg_anEnum, + ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NIFlutterIntegrationCoreApi.echoAnotherAsyncNullableEnum$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + final List args = message! as List; + final NIAnotherEnum? arg_anotherEnum = args[0] as NIAnotherEnum?; + try { + final NIAnotherEnum? output = await api + .echoAnotherAsyncNullableEnum(arg_anotherEnum); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + } + + static NIFlutterIntegrationCoreApi implement( + NIFlutterIntegrationCoreApi api, { + String name = '', + }) { + return NIFlutterIntegrationCoreApiRegistrar().register(api, name: name); + } +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.ffi.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.ffi.dart new file mode 100644 index 000000000000..c22a0e0e6729 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.ffi.dart @@ -0,0 +1,37054 @@ +// 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. +// + +// ignore_for_file: always_specify_types, camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field +// coverage:ignore-file + +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint, unused_import +import 'dart:ffi' as ffi; +import 'package:objective_c/objective_c.dart' as objc; +import 'package:ffi/ffi.dart' as pkg_ffi; + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external void _umaz4x_protocolTrampoline_18v1jvf( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external void _umaz4x_protocolTrampoline_bklti2( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, +); + +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external void _umaz4x_protocolTrampoline_jk1ljc( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external ffi.Pointer _umaz4x_protocolTrampoline_qfyidt( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external ffi.Pointer _umaz4x_protocolTrampoline_xr62hr( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external ffi.Pointer _umaz4x_protocolTrampoline_zi5eed( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapBlockingBlock_18v1jvf( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapBlockingBlock_1pl9qdv( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapBlockingBlock_bklti2( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapBlockingBlock_jk1ljc( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapBlockingBlock_xtuoz7( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapListenerBlock_18v1jvf( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapListenerBlock_1pl9qdv( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapListenerBlock_bklti2( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapListenerBlock_jk1ljc( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _umaz4x_wrapListenerBlock_xtuoz7( + ffi.Pointer block, +); + +/// A class for testing nested class handling. +/// This is needed to test nested nullable and non-nullable classes, +/// NIAllNullableTypes is non-nullable here as it is easier to instantiate +/// than NIAllTypes when testing doesn’t require both (ie. testing null classes). +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIAllClassesWrapperBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIAllClassesWrapperBridge] that points to the same underlying object as [other]. + NIAllClassesWrapperBridge.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIAllClassesWrapperBridge] that wraps the given raw object pointer. + NIAllClassesWrapperBridge.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIAllClassesWrapperBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIAllClassesWrapperBridge, + ); + + /// alloc + static NIAllClassesWrapperBridge alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NIAllClassesWrapperBridge, + _sel_alloc, + ); + return NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NIAllClassesWrapperBridge allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NIAllClassesWrapperBridge, + _sel_allocWithZone_, + zone, + ); + return NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NIAllClassesWrapperBridge new$() { + final $ret = _objc_msgSend_151sglz( + _class_NIAllClassesWrapperBridge, + _sel_new, + ); + return NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// Returns a new instance of NIAllClassesWrapperBridge constructed with the default `new` method. + NIAllClassesWrapperBridge() : this.as(new$().object$); +} + +extension NIAllClassesWrapperBridge$Methods on NIAllClassesWrapperBridge { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge get allNullableTypes { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.allNullableTypes', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_allNullableTypes, + ); + return NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + get allNullableTypesWithoutRecursion { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.allNullableTypesWithoutRecursion', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_allNullableTypesWithoutRecursion, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllTypesBridge? get allTypes { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.allTypes', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_allTypes); + return $ret.address == 0 + ? null + : NIAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get classList { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.classList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_classList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get classMap { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.classMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_classMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// init + NIAllClassesWrapperBridge init() { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// initWithAllNullableTypes:allNullableTypesWithoutRecursion:allTypes:classList:nullableClassList:classMap:nullableClassMap: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllClassesWrapperBridge initWithAllNullableTypes( + NIAllNullableTypesBridge allNullableTypes, { + NIAllNullableTypesWithoutRecursionBridge? allNullableTypesWithoutRecursion, + NIAllTypesBridge? allTypes, + required objc.NSArray classList, + objc.NSArray? nullableClassList, + required objc.NSDictionary classMap, + objc.NSDictionary? nullableClassMap, + }) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.initWithAllNullableTypes:allNullableTypesWithoutRecursion:allTypes:classList:nullableClassList:classMap:nullableClassMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1387m63( + object$.ref.retainAndReturnPointer(), + _sel_initWithAllNullableTypes_allNullableTypesWithoutRecursion_allTypes_classList_nullableClassList_classMap_nullableClassMap_, + allNullableTypes.ref.pointer, + allNullableTypesWithoutRecursion?.ref.pointer ?? ffi.nullptr, + allTypes?.ref.pointer ?? ffi.nullptr, + classList.ref.pointer, + nullableClassList?.ref.pointer ?? ffi.nullptr, + classMap.ref.pointer, + nullableClassMap?.ref.pointer ?? ffi.nullptr, + ); + return NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get nullableClassList { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.nullableClassList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_nullableClassList, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get nullableClassMap { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.nullableClassMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_nullableClassMap, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set allNullableTypes(NIAllNullableTypesBridge value) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setAllNullableTypes:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAllNullableTypes_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set allNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursionBridge? value, + ) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setAllNullableTypesWithoutRecursion:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAllNullableTypesWithoutRecursion_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set allTypes(NIAllTypesBridge? value) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setAllTypes:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAllTypes_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set classList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setClassList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setClassList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set classMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setClassMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setClassMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set nullableClassList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setNullableClassList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setNullableClassList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set nullableClassMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllClassesWrapperBridge.setNullableClassMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setNullableClassMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } +} + +/// A class containing all supported nullable types. +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIAllNullableTypesBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIAllNullableTypesBridge] that points to the same underlying object as [other]. + NIAllNullableTypesBridge.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIAllNullableTypesBridge] that wraps the given raw object pointer. + NIAllNullableTypesBridge.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIAllNullableTypesBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIAllNullableTypesBridge, + ); + + /// alloc + static NIAllNullableTypesBridge alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NIAllNullableTypesBridge, + _sel_alloc, + ); + return NIAllNullableTypesBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NIAllNullableTypesBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NIAllNullableTypesBridge, + _sel_allocWithZone_, + zone, + ); + return NIAllNullableTypesBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NIAllNullableTypesBridge new$() { + final $ret = _objc_msgSend_151sglz( + _class_NIAllNullableTypesBridge, + _sel_new, + ); + return NIAllNullableTypesBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// Returns a new instance of NIAllNullableTypesBridge constructed with the default `new` method. + NIAllNullableTypesBridge() : this.as(new$().object$); +} + +extension NIAllNullableTypesBridge$Methods on NIAllNullableTypesBridge { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullable4ByteArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullable4ByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullable4ByteArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullable8ByteArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullable8ByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullable8ByteArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableBool { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableBool', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableBool); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullableByteArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableByteArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableDouble { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableDouble', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableDouble, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableEnum { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableEnum', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableEnum); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullableFloatArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableFloatArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableFloatArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableInt { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableInt', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableInt); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableInt64 { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableInt64', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableInt64, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? get aNullableObject { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableObject', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableObject, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? get aNullableString { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.aNullableString', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableString, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? get allNullableTypes { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.allNullableTypes', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_allNullableTypes, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get anotherNullableEnum { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.anotherNullableEnum', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_anotherNullableEnum, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get boolList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.boolList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_boolList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get doubleList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.doubleList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_doubleList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get enumList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.enumList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get enumMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.enumMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// init + NIAllNullableTypesBridge init() { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIAllNullableTypesBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// initWithANullableBool:aNullableInt:aNullableInt64:aNullableDouble:aNullableByteArray:aNullable4ByteArray:aNullable8ByteArray:aNullableFloatArray:aNullableEnum:anotherNullableEnum:aNullableString:aNullableObject:allNullableTypes:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:recursiveClassList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:recursiveClassMap: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge initWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSNumber? aNullableInt64, + objc.NSNumber? aNullableDouble, + NiTestsPigeonTypedData? aNullableByteArray, + NiTestsPigeonTypedData? aNullable4ByteArray, + NiTestsPigeonTypedData? aNullable8ByteArray, + NiTestsPigeonTypedData? aNullableFloatArray, + objc.NSNumber? aNullableEnum, + objc.NSNumber? anotherNullableEnum, + objc.NSString? aNullableString, + objc.NSObject? aNullableObject, + NIAllNullableTypesBridge? allNullableTypes, + objc.NSArray? list, + objc.NSArray? stringList, + objc.NSArray? intList, + objc.NSArray? doubleList, + objc.NSArray? boolList, + objc.NSArray? enumList, + objc.NSArray? objectList, + objc.NSArray? listList, + objc.NSArray? mapList, + objc.NSArray? recursiveClassList, + objc.NSDictionary? map, + objc.NSDictionary? stringMap, + objc.NSDictionary? intMap, + objc.NSDictionary? enumMap, + objc.NSDictionary? objectMap, + objc.NSDictionary? listMap, + objc.NSDictionary? mapMap, + objc.NSDictionary? recursiveClassMap, + }) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.initWithANullableBool:aNullableInt:aNullableInt64:aNullableDouble:aNullableByteArray:aNullable4ByteArray:aNullable8ByteArray:aNullableFloatArray:aNullableEnum:anotherNullableEnum:aNullableString:aNullableObject:allNullableTypes:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:recursiveClassList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:recursiveClassMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_etw0ff( + object$.ref.retainAndReturnPointer(), + _sel_initWithANullableBool_aNullableInt_aNullableInt64_aNullableDouble_aNullableByteArray_aNullable4ByteArray_aNullable8ByteArray_aNullableFloatArray_aNullableEnum_anotherNullableEnum_aNullableString_aNullableObject_allNullableTypes_list_stringList_intList_doubleList_boolList_enumList_objectList_listList_mapList_recursiveClassList_map_stringMap_intMap_enumMap_objectMap_listMap_mapMap_recursiveClassMap_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableInt64?.ref.pointer ?? ffi.nullptr, + aNullableDouble?.ref.pointer ?? ffi.nullptr, + aNullableByteArray?.ref.pointer ?? ffi.nullptr, + aNullable4ByteArray?.ref.pointer ?? ffi.nullptr, + aNullable8ByteArray?.ref.pointer ?? ffi.nullptr, + aNullableFloatArray?.ref.pointer ?? ffi.nullptr, + aNullableEnum?.ref.pointer ?? ffi.nullptr, + anotherNullableEnum?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + aNullableObject?.ref.pointer ?? ffi.nullptr, + allNullableTypes?.ref.pointer ?? ffi.nullptr, + list?.ref.pointer ?? ffi.nullptr, + stringList?.ref.pointer ?? ffi.nullptr, + intList?.ref.pointer ?? ffi.nullptr, + doubleList?.ref.pointer ?? ffi.nullptr, + boolList?.ref.pointer ?? ffi.nullptr, + enumList?.ref.pointer ?? ffi.nullptr, + objectList?.ref.pointer ?? ffi.nullptr, + listList?.ref.pointer ?? ffi.nullptr, + mapList?.ref.pointer ?? ffi.nullptr, + recursiveClassList?.ref.pointer ?? ffi.nullptr, + map?.ref.pointer ?? ffi.nullptr, + stringMap?.ref.pointer ?? ffi.nullptr, + intMap?.ref.pointer ?? ffi.nullptr, + enumMap?.ref.pointer ?? ffi.nullptr, + objectMap?.ref.pointer ?? ffi.nullptr, + listMap?.ref.pointer ?? ffi.nullptr, + mapMap?.ref.pointer ?? ffi.nullptr, + recursiveClassMap?.ref.pointer ?? ffi.nullptr, + ); + return NIAllNullableTypesBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get intList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.intList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get intMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.intMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get list { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.list', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_list); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get listList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.listList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get listMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.listMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get map { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.map', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_map); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get mapList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.mapList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get mapMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.mapMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get objectList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.objectList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get objectMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.objectMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get recursiveClassList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.recursiveClassList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_recursiveClassList, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get recursiveClassMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.recursiveClassMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_recursiveClassMap, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullable4ByteArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullable4ByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable4ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullable8ByteArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullable8ByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable8ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableBool(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableBool:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableBool_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableByteArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableDouble(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableDouble:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableDouble_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableEnum(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableEnum:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableFloatArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableFloatArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableFloatArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableInt64(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableInt64:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt64_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableInt(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableInt:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableObject(objc.NSObject? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableObject:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableObject_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableString(objc.NSString? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setANullableString:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableString_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set allNullableTypes(NIAllNullableTypesBridge? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setAllNullableTypes:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAllNullableTypes_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anotherNullableEnum(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setAnotherNullableEnum:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAnotherNullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set boolList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setBoolList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setBoolList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set doubleList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setDoubleList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setDoubleList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set enumList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setEnumList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setEnumList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set enumMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setEnumMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setEnumMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set intList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setIntList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setIntList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set intMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setIntMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setIntMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set list(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set listList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setListList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setListList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set listMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setListMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setListMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set map(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set mapList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setMapList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMapList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set mapMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setMapMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMapMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set objectList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setObjectList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set objectMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setObjectMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set recursiveClassList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setRecursiveClassList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setRecursiveClassList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set recursiveClassMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setRecursiveClassMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setRecursiveClassMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set stringList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setStringList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set stringMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.setStringMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get stringList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.stringList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get stringMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesBridge.stringMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NIAllNullableTypes] class is being used to +/// test Swift classes. +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIAllNullableTypesWithoutRecursionBridge._( + objc.ObjCObject object$ +) implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIAllNullableTypesWithoutRecursionBridge] that points to the same underlying object as [other]. + NIAllNullableTypesWithoutRecursionBridge.as(objc.ObjCObject other) + : object$ = other { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIAllNullableTypesWithoutRecursionBridge] that wraps the given raw object pointer. + NIAllNullableTypesWithoutRecursionBridge.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIAllNullableTypesWithoutRecursionBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIAllNullableTypesWithoutRecursionBridge, + ); + + /// alloc + static NIAllNullableTypesWithoutRecursionBridge alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NIAllNullableTypesWithoutRecursionBridge, + _sel_alloc, + ); + return NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NIAllNullableTypesWithoutRecursionBridge allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NIAllNullableTypesWithoutRecursionBridge, + _sel_allocWithZone_, + zone, + ); + return NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NIAllNullableTypesWithoutRecursionBridge new$() { + final $ret = _objc_msgSend_151sglz( + _class_NIAllNullableTypesWithoutRecursionBridge, + _sel_new, + ); + return NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// Returns a new instance of NIAllNullableTypesWithoutRecursionBridge constructed with the default `new` method. + NIAllNullableTypesWithoutRecursionBridge() : this.as(new$().object$); +} + +extension NIAllNullableTypesWithoutRecursionBridge$Methods + on NIAllNullableTypesWithoutRecursionBridge { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullable4ByteArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullable4ByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullable4ByteArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullable8ByteArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullable8ByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullable8ByteArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableBool { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableBool', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableBool); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullableByteArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableByteArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableDouble { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableDouble', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableDouble, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableEnum { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableEnum', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableEnum); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? get aNullableFloatArray { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableFloatArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableFloatArray, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableInt { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableInt', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableInt); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get aNullableInt64 { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableInt64', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableInt64, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? get aNullableObject { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableObject', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableObject, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? get aNullableString { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.aNullableString', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_aNullableString, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? get anotherNullableEnum { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.anotherNullableEnum', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.pointer, + _sel_anotherNullableEnum, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get boolList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.boolList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_boolList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get doubleList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.doubleList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_doubleList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get enumList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.enumList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get enumMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.enumMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// init + NIAllNullableTypesWithoutRecursionBridge init() { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// initWithANullableBool:aNullableInt:aNullableInt64:aNullableDouble:aNullableByteArray:aNullable4ByteArray:aNullable8ByteArray:aNullableFloatArray:aNullableEnum:anotherNullableEnum:aNullableString:aNullableObject:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge initWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSNumber? aNullableInt64, + objc.NSNumber? aNullableDouble, + NiTestsPigeonTypedData? aNullableByteArray, + NiTestsPigeonTypedData? aNullable4ByteArray, + NiTestsPigeonTypedData? aNullable8ByteArray, + NiTestsPigeonTypedData? aNullableFloatArray, + objc.NSNumber? aNullableEnum, + objc.NSNumber? anotherNullableEnum, + objc.NSString? aNullableString, + objc.NSObject? aNullableObject, + objc.NSArray? list, + objc.NSArray? stringList, + objc.NSArray? intList, + objc.NSArray? doubleList, + objc.NSArray? boolList, + objc.NSArray? enumList, + objc.NSArray? objectList, + objc.NSArray? listList, + objc.NSArray? mapList, + objc.NSDictionary? map, + objc.NSDictionary? stringMap, + objc.NSDictionary? intMap, + objc.NSDictionary? enumMap, + objc.NSDictionary? objectMap, + objc.NSDictionary? listMap, + objc.NSDictionary? mapMap, + }) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.initWithANullableBool:aNullableInt:aNullableInt64:aNullableDouble:aNullableByteArray:aNullable4ByteArray:aNullable8ByteArray:aNullableFloatArray:aNullableEnum:anotherNullableEnum:aNullableString:aNullableObject:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1hm1urt( + object$.ref.retainAndReturnPointer(), + _sel_initWithANullableBool_aNullableInt_aNullableInt64_aNullableDouble_aNullableByteArray_aNullable4ByteArray_aNullable8ByteArray_aNullableFloatArray_aNullableEnum_anotherNullableEnum_aNullableString_aNullableObject_list_stringList_intList_doubleList_boolList_enumList_objectList_listList_mapList_map_stringMap_intMap_enumMap_objectMap_listMap_mapMap_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableInt64?.ref.pointer ?? ffi.nullptr, + aNullableDouble?.ref.pointer ?? ffi.nullptr, + aNullableByteArray?.ref.pointer ?? ffi.nullptr, + aNullable4ByteArray?.ref.pointer ?? ffi.nullptr, + aNullable8ByteArray?.ref.pointer ?? ffi.nullptr, + aNullableFloatArray?.ref.pointer ?? ffi.nullptr, + aNullableEnum?.ref.pointer ?? ffi.nullptr, + anotherNullableEnum?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + aNullableObject?.ref.pointer ?? ffi.nullptr, + list?.ref.pointer ?? ffi.nullptr, + stringList?.ref.pointer ?? ffi.nullptr, + intList?.ref.pointer ?? ffi.nullptr, + doubleList?.ref.pointer ?? ffi.nullptr, + boolList?.ref.pointer ?? ffi.nullptr, + enumList?.ref.pointer ?? ffi.nullptr, + objectList?.ref.pointer ?? ffi.nullptr, + listList?.ref.pointer ?? ffi.nullptr, + mapList?.ref.pointer ?? ffi.nullptr, + map?.ref.pointer ?? ffi.nullptr, + stringMap?.ref.pointer ?? ffi.nullptr, + intMap?.ref.pointer ?? ffi.nullptr, + enumMap?.ref.pointer ?? ffi.nullptr, + objectMap?.ref.pointer ?? ffi.nullptr, + listMap?.ref.pointer ?? ffi.nullptr, + mapMap?.ref.pointer ?? ffi.nullptr, + ); + return NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get intList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.intList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get intMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.intMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get list { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.list', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_list); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get listList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.listList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get listMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.listMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get map { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.map', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_map); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get mapList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.mapList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get mapMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.mapMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get objectList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.objectList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get objectMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.objectMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullable4ByteArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullable4ByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable4ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullable8ByteArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullable8ByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable8ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableBool(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableBool:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableBool_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableByteArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableDouble(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableDouble:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableDouble_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableEnum(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableEnum:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableFloatArray(NiTestsPigeonTypedData? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableFloatArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableFloatArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableInt64(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableInt64:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt64_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableInt(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableInt:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableObject(objc.NSObject? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableObject:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableObject_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aNullableString(objc.NSString? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setANullableString:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableString_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anotherNullableEnum(objc.NSNumber? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setAnotherNullableEnum:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAnotherNullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set boolList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setBoolList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setBoolList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set doubleList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setDoubleList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setDoubleList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set enumList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setEnumList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setEnumList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set enumMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setEnumMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setEnumMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set intList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setIntList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setIntList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set intMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setIntMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setIntMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set list(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set listList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setListList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setListList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set listMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setListMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setListMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set map(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set mapList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setMapList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMapList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set mapMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setMapMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMapMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set objectList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setObjectList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set objectMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setObjectMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set stringList(objc.NSArray? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setStringList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set stringMap(objc.NSDictionary? value) { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.setStringMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? get stringList { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.stringList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringList); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? get stringMap { + objc.checkOsVersionInternal( + 'NIAllNullableTypesWithoutRecursionBridge.stringMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +/// A class containing all supported types. +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIAllTypesBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIAllTypesBridge] that points to the same underlying object as [other]. + NIAllTypesBridge.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NIAllTypesBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIAllTypesBridge] that wraps the given raw object pointer. + NIAllTypesBridge.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIAllTypesBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIAllTypesBridge, + ); + + /// alloc + static NIAllTypesBridge alloc() { + final $ret = _objc_msgSend_151sglz(_class_NIAllTypesBridge, _sel_alloc); + return NIAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NIAllTypesBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NIAllTypesBridge, + _sel_allocWithZone_, + zone, + ); + return NIAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// new + static NIAllTypesBridge new$() { + final $ret = _objc_msgSend_151sglz(_class_NIAllTypesBridge, _sel_new); + return NIAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NIAllTypesBridge constructed with the default `new` method. + NIAllTypesBridge() : this.as(new$().object$); +} + +extension NIAllTypesBridge$Methods on NIAllTypesBridge { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData get a4ByteArray { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.a4ByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_a4ByteArray); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData get a8ByteArray { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.a8ByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_a8ByteArray); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + bool get aBool { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.aBool', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + return _objc_msgSend_91o635(object$.ref.pointer, _sel_aBool); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData get aByteArray { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.aByteArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aByteArray); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + double get aDouble { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.aDouble', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(object$.ref.pointer, _sel_aDouble) + : _objc_msgSend_1ukqyt8(object$.ref.pointer, _sel_aDouble); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData get aFloatArray { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.aFloatArray', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aFloatArray); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString get aString { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.aString', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aString); + return objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAnEnum get anEnum { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.anEnum', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_d3bb7e(object$.ref.pointer, _sel_anEnum); + return NIAnEnum.fromValue($ret); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + int get anInt { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.anInt', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + return _objc_msgSend_pysgoz(object$.ref.pointer, _sel_anInt); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + int get anInt64 { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.anInt64', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + return _objc_msgSend_pysgoz(object$.ref.pointer, _sel_anInt64); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject get anObject { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.anObject', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_anObject); + return objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAnotherEnum get anotherEnum { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.anotherEnum', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1otznu6(object$.ref.pointer, _sel_anotherEnum); + return NIAnotherEnum.fromValue($ret); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get boolList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.boolList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_boolList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get doubleList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.doubleList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_doubleList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get enumList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.enumList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get enumMap { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.enumMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// init + NIAllTypesBridge init() { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// initWithABool:anInt:anInt64:aDouble:aByteArray:a4ByteArray:a8ByteArray:aFloatArray:anEnum:anotherEnum:aString:anObject:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllTypesBridge initWithABool( + bool aBool, { + required int anInt, + required int anInt64, + required double aDouble, + required NiTestsPigeonTypedData aByteArray, + required NiTestsPigeonTypedData a4ByteArray, + required NiTestsPigeonTypedData a8ByteArray, + required NiTestsPigeonTypedData aFloatArray, + required NIAnEnum anEnum, + required NIAnotherEnum anotherEnum, + required objc.NSString aString, + required objc.NSObject anObject, + required objc.NSArray list, + required objc.NSArray stringList, + required objc.NSArray intList, + required objc.NSArray doubleList, + required objc.NSArray boolList, + required objc.NSArray enumList, + required objc.NSArray objectList, + required objc.NSArray listList, + required objc.NSArray mapList, + required objc.NSDictionary map, + required objc.NSDictionary stringMap, + required objc.NSDictionary intMap, + required objc.NSDictionary enumMap, + required objc.NSDictionary objectMap, + required objc.NSDictionary listMap, + required objc.NSDictionary mapMap, + }) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.initWithABool:anInt:anInt64:aDouble:aByteArray:a4ByteArray:a8ByteArray:aFloatArray:anEnum:anotherEnum:aString:anObject:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_whwize( + object$.ref.retainAndReturnPointer(), + _sel_initWithABool_anInt_anInt64_aDouble_aByteArray_a4ByteArray_a8ByteArray_aFloatArray_anEnum_anotherEnum_aString_anObject_list_stringList_intList_doubleList_boolList_enumList_objectList_listList_mapList_map_stringMap_intMap_enumMap_objectMap_listMap_mapMap_, + aBool, + anInt, + anInt64, + aDouble, + aByteArray.ref.pointer, + a4ByteArray.ref.pointer, + a8ByteArray.ref.pointer, + aFloatArray.ref.pointer, + anEnum.value, + anotherEnum.value, + aString.ref.pointer, + anObject.ref.pointer, + list.ref.pointer, + stringList.ref.pointer, + intList.ref.pointer, + doubleList.ref.pointer, + boolList.ref.pointer, + enumList.ref.pointer, + objectList.ref.pointer, + listList.ref.pointer, + mapList.ref.pointer, + map.ref.pointer, + stringMap.ref.pointer, + intMap.ref.pointer, + enumMap.ref.pointer, + objectMap.ref.pointer, + listMap.ref.pointer, + mapMap.ref.pointer, + ); + return NIAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get intList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.intList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get intMap { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.intMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get list { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.list', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_list); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get listList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.listList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get listMap { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.listMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get map { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.map', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_map); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get mapList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.mapList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get mapMap { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.mapMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get objectList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.objectList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get objectMap { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.objectMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set a4ByteArray(NiTestsPigeonTypedData value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setA4ByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setA4ByteArray_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set a8ByteArray(NiTestsPigeonTypedData value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setA8ByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setA8ByteArray_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aBool(bool value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setABool:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1s56lr9(object$.ref.pointer, _sel_setABool_, value); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aByteArray(NiTestsPigeonTypedData value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAByteArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAByteArray_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aDouble(double value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setADouble:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_hwm8nu(object$.ref.pointer, _sel_setADouble_, value); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aFloatArray(NiTestsPigeonTypedData value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAFloatArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAFloatArray_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aString(objc.NSString value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAString:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAString_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anEnum(NIAnEnum value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAnEnum:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_15w00rc(object$.ref.pointer, _sel_setAnEnum_, value.value); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anInt64(int value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAnInt64:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_17gvxvj(object$.ref.pointer, _sel_setAnInt64_, value); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anInt(int value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAnInt:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_17gvxvj(object$.ref.pointer, _sel_setAnInt_, value); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anObject(objc.NSObject value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAnObject:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAnObject_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set anotherEnum(NIAnotherEnum value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setAnotherEnum:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_ih63eg( + object$.ref.pointer, + _sel_setAnotherEnum_, + value.value, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set boolList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setBoolList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setBoolList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set doubleList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setDoubleList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setDoubleList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set enumList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setEnumList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setEnumList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set enumMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setEnumMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setEnumMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set intList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setIntList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setIntList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set intMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setIntMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setIntMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set list(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setList_, value.ref.pointer); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set listList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setListList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setListList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set listMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setListMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setListMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set map(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMap_, value.ref.pointer); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set mapList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setMapList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMapList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set mapMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setMapMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMapMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set objectList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setObjectList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set objectMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setObjectMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set stringList(objc.NSArray value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setStringList:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringList_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set stringMap(objc.NSDictionary value) { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.setStringMap:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringMap_, + value.ref.pointer, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray get stringList { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.stringList', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary get stringMap { + objc.checkOsVersionInternal( + 'NIAllTypesBridge.stringMap', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +enum NIAnEnum { + NIAnEnumOne(0), + NIAnEnumTwo(1), + NIAnEnumThree(2), + NIAnEnumFortyTwo(3), + NIAnEnumFourHundredTwentyTwo(4); + + final int value; + const NIAnEnum(this.value); + + static NIAnEnum fromValue(int value) => switch (value) { + 0 => NIAnEnumOne, + 1 => NIAnEnumTwo, + 2 => NIAnEnumThree, + 3 => NIAnEnumFortyTwo, + 4 => NIAnEnumFourHundredTwentyTwo, + _ => throw ArgumentError('Unknown value for NIAnEnum: $value'), + }; +} + +enum NIAnotherEnum { + NIAnotherEnumJustInCase(0); + + final int value; + const NIAnotherEnum(this.value); + + static NIAnotherEnum fromValue(int value) => switch (value) { + 0 => NIAnotherEnumJustInCase, + _ => throw ArgumentError('Unknown value for NIAnotherEnum: $value'), + }; +} + +/// The core interface that the Dart platform_test code implements for host +/// integration tests to call into. +/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIFlutterIntegrationCoreApiBridge._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NIFlutterIntegrationCoreApiBridge] that points to the same underlying object as [other]. + NIFlutterIntegrationCoreApiBridge.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NIFlutterIntegrationCoreApiBridge] that wraps the given raw object pointer. + NIFlutterIntegrationCoreApiBridge.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NIFlutterIntegrationCoreApiBridge]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NIFlutterIntegrationCoreApiBridge, + ); + } +} + +extension NIFlutterIntegrationCoreApiBridge$Methods + on NIFlutterIntegrationCoreApiBridge { + /// echoAnotherAsyncEnumWithAnotherEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAnotherAsyncEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAnotherAsyncEnumWithAnotherEnum:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAnotherAsyncNullableEnumWithAnotherEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAnotherAsyncNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAnotherAsyncNullableEnumWithAnotherEnum:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoAnotherNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAnotherNullableEnumWithAnotherEnum:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAnotherNullableEnumWithAnotherEnum_error_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// echoAsyncBoolWithABool:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncBoolWithABool:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncBoolWithABool_error_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncClassListWithClassList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncClassMapWithClassMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncClassMapWithClassMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassMapWithClassMap_error_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncDoubleWithADouble:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncDoubleWithADouble:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncDoubleWithADouble_error_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncEnumListWithEnumList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncEnumMapWithEnumMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncEnumMapWithEnumMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncEnumWithAnEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncEnumWithAnEnum:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumWithAnEnum_error_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncFloat64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncFloat64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncFloat64ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncFloat64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncInt32ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncInt32ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncInt32ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncInt32ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncInt64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncInt64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncInt64ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncInt64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncIntMapWithIntMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncIntMapWithIntMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncIntMapWithIntMap_error_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncIntWithAnInt:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncIntWithAnInt:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncIntWithAnInt_error_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncListWithList( + objc.NSArray? list, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncMapWithMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncMapWithMap( + objc.NSDictionary? map, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncMapWithMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncMapWithMap_error_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNIAllTypesWithEverything:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNIAllTypesWithEverything( + NIAllTypesBridge? everything, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNIAllTypesWithEverything:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNIAllTypesWithEverything_error_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNonNullClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNonNullClassListWithClassList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNonNullEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNonNullEnumListWithEnumList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableBoolWithABool:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableBoolWithABool:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableBoolWithABool_error_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableClassListWithClassList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableClassMapWithClassMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableClassMapWithClassMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableDoubleWithADouble:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableDoubleWithADouble:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableEnumListWithEnumList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableEnumMapWithEnumMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableEnumMapWithEnumMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableEnumWithAnEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableEnumWithAnEnum:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableFloat64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableFloat64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableFloat64ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableInt32ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableInt32ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableInt32ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableInt64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableInt64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableInt64ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableIntMapWithIntMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableIntMapWithIntMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableIntWithAnInt:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableIntWithAnInt:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableListWithList( + objc.NSArray? list, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableMapWithMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableMapWithMap( + objc.NSDictionary? map, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableMapWithMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableMapWithMap_error_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNIAllNullableTypesWithEverything:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableNIAllNullableTypesWithEverything( + NIAllNullableTypesBridge? everything, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableNIAllNullableTypesWithEverything:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything( + NIAllNullableTypesWithoutRecursionBridge? everything, { + required NiTestsError error, + required objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNonNullClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableNonNullClassListWithClassList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNonNullEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableNonNullEnumListWithEnumList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableObjectWithAnObject:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableObjectWithAnObject( + objc.NSObject? anObject, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableObjectWithAnObject:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_, + anObject?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableStringMapWithStringMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableStringMapWithStringMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableStringWithAString:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableStringWithAString( + objc.NSString? aString, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableStringWithAString:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableStringWithAString_error_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableUint8ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableUint8ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncNullableUint8ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncObjectWithAnObject:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncObjectWithAnObject( + objc.NSObject? anObject, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncObjectWithAnObject:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncObjectWithAnObject_error_completionHandler_, + anObject?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncStringMapWithStringMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncStringMapWithStringMap:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringMapWithStringMap_error_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncStringWithAString:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncStringWithAString( + objc.NSString? aString, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncStringWithAString:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringWithAString_error_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncUint8ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncUint8ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoAsyncUint8ListWithList:error:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncUint8ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed boolean, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoBoolWithABool:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoBoolWithABool_error_, + aBool?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoClassListWithClassList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoClassListWithClassList_error_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoClassMapWithClassMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoClassMapWithClassMap_error_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed double, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoDoubleWithADouble:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoDoubleWithADouble_error_, + aDouble?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoEnumListWithEnumList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoEnumListWithEnumList_error_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoEnumMapWithEnumMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoEnumMapWithEnumMap_error_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoEnumWithAnEnum:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoEnumWithAnEnum_error_, + anEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed float64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoFloat64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoFloat64ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoFloat64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int32 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoInt32ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoInt32ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt32ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoInt64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoInt64ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoIntMapWithIntMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoIntMapWithIntMap_error_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoIntWithAnInt:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoIntWithAnInt_error_, + anInt?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoListWithList( + objc.NSArray? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoMapWithMap( + objc.NSDictionary? map, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoMapWithMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoMapWithMap_error_, + map?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? echoNIAllNullableTypesWithEverything( + NIAllNullableTypesBridge? everything, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNIAllNullableTypesWithEverything:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNIAllNullableTypesWithEverything_error_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + echoNIAllNullableTypesWithoutRecursionWithEverything( + NIAllNullableTypesWithoutRecursionBridge? everything, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNIAllNullableTypesWithoutRecursionWithEverything:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllTypesBridge? echoNIAllTypesWithEverything( + NIAllTypesBridge? everything, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNIAllTypesWithEverything:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNIAllTypesWithEverything_error_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNIAnotherEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNIAnotherEnumWithAnotherEnum:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNIAnotherEnumWithAnotherEnum_error_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNonNullClassListWithClassList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullClassListWithClassList_error_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNonNullClassMapWithClassMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullClassMapWithClassMap_error_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNonNullEnumListWithEnumList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullEnumListWithEnumList_error_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNonNullEnumMapWithEnumMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullEnumMapWithEnumMap_error_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNonNullIntMapWithIntMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullIntMapWithIntMap_error_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNonNullStringMapWithStringMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullStringMapWithStringMap_error_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed boolean, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableBoolWithABool:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableBoolWithABool_error_, + aBool?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableClassListWithClassList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableClassListWithClassList_error_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableClassMapWithClassMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableClassMapWithClassMap_error_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed double, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableDoubleWithADouble:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableDoubleWithADouble_error_, + aDouble?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableEnumListWithEnumList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableEnumListWithEnumList_error_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableEnumMapWithEnumMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableEnumMapWithEnumMap_error_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableEnumWithAnEnum:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableEnumWithAnEnum_error_, + anEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed float64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableFloat64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableFloat64ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableFloat64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int32 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableInt32ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableInt32ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt32ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableInt64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableInt64ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableIntMapWithIntMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableIntMapWithIntMap_error_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableIntWithAnInt:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableIntWithAnInt_error_, + anInt?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableListWithList( + objc.NSArray? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableMapWithMap( + objc.NSDictionary? map, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableMapWithMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableMapWithMap_error_, + map?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableNonNullClassListWithClassList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullClassListWithClassList_error_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableNonNullClassMapWithClassMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullClassMapWithClassMap_error_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableNonNullEnumListWithEnumList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullEnumListWithEnumList_error_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableNonNullEnumMapWithEnumMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullEnumMapWithEnumMap_error_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableNonNullIntMapWithIntMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullIntMapWithIntMap_error_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableNonNullStringMapWithStringMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullStringMapWithStringMap_error_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableStringMapWithStringMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableStringMapWithStringMap_error_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed string, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? echoNullableStringWithAString( + objc.NSString? aString, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableStringWithAString:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableStringWithAString_error_, + aString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed byte list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableUint8ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoNullableUint8ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableUint8ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoStringMapWithStringMap:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoStringMapWithStringMap_error_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed string, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? echoStringWithAString( + objc.NSString? aString, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoStringWithAString:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoStringWithAString_error_, + aString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed byte list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoUint8ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.echoUint8ListWithList:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoUint8ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void noopAsyncWithError( + NiTestsError error, { + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.noopAsyncWithError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_noopAsyncWithError_completionHandler_, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void noopWithError(NiTestsError error) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.noopWithError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_noopWithError_, + error.ref.pointer, + ); + } + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? sendMultipleNullableTypesWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.sendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_s92gih( + object$.ref.pointer, + _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + sendMultipleNullableTypesWithoutRecursionWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NiTestsError error, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.sendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_s92gih( + object$.ref.pointer, + _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Responds with an error from an async void function. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void throwErrorFromVoidWithError(NiTestsError error) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.throwErrorFromVoidWithError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_throwErrorFromVoidWithError_, + error.ref.pointer, + ); + } + + /// Responds with an error from an async function returning a value. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? throwErrorWithError(NiTestsError error) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.throwErrorWithError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_throwErrorWithError_, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// throwFlutterErrorAsyncWithError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void throwFlutterErrorAsyncWithError( + NiTestsError error, { + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.throwFlutterErrorAsyncWithError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_throwFlutterErrorAsyncWithError_completionHandler_, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns a Flutter error, to test error handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? throwFlutterErrorWithError(NiTestsError error) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiBridge.throwFlutterErrorWithError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_throwFlutterErrorWithError_, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } +} + +interface class NIFlutterIntegrationCoreApiBridge$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => objc.Protocol.fromPointer( + _protocol_NIFlutterIntegrationCoreApiBridge.cast(), + ); + + /// Builds an object that implements the NIFlutterIntegrationCoreApiBridge protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NIFlutterIntegrationCoreApiBridge implement({ + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoMapWithMap_error_, + required NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithEverything_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + required NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + echoNIAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNIAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoNullableStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NiTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NiTestsError) noopWithError_, + required NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NiTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NiTestsError) throwErrorWithError_, + required void Function( + NiTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NiTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NIFlutterIntegrationCoreApiBridge', + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implement( + builder, + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implement( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implement(builder, echoAsyncBoolWithABool_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implement( + builder, + echoAsyncClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implement( + builder, + echoAsyncDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implement( + builder, + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implement(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implement(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implement(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implement(builder, echoAsyncListWithList_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implement(builder, echoAsyncMapWithMap_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implement( + builder, + echoAsyncNullableBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implement( + builder, + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implement( + builder, + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implement( + builder, + echoAsyncNullableIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implement( + builder, + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implement( + builder, + echoAsyncNullableStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implement( + builder, + echoAsyncObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implement( + builder, + echoAsyncStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implement( + builder, + echoAsyncStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, echoBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_ + .implement(builder, echoClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, echoDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_ + .implement(builder, echoEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, echoEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, echoEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, echoFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, echoInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, echoInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, echoIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, echoNIAllNullableTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement( + builder, + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, echoNIAllTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNIAnotherEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_ + .implement(builder, echoNullableBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_ + .implement(builder, echoNullableIntWithAnInt_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_ + .implement(builder, echoNullableListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, echoNullableMapWithMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, echoStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, echoUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implement(builder, noopAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implement( + builder, + noopWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implement(builder, throwErrorFromVoidWithError_); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implement(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, throwFlutterErrorWithError_); + builder.addProtocol($protocol); + return NIFlutterIntegrationCoreApiBridge.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NIFlutterIntegrationCoreApiBridge protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoMapWithMap_error_, + required NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithEverything_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + required NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + echoNIAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNIAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoNullableStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NiTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NiTestsError) noopWithError_, + required NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NiTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NiTestsError) throwErrorWithError_, + required void Function( + NiTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NiTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implement( + builder, + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implement( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implement(builder, echoAsyncBoolWithABool_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implement( + builder, + echoAsyncClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implement( + builder, + echoAsyncDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implement( + builder, + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implement(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implement(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implement(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implement(builder, echoAsyncListWithList_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implement(builder, echoAsyncMapWithMap_error_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implement( + builder, + echoAsyncNullableBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implement( + builder, + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implement( + builder, + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implement( + builder, + echoAsyncNullableIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implement( + builder, + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implement( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implement( + builder, + echoAsyncNullableStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implement( + builder, + echoAsyncObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implement( + builder, + echoAsyncStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implement( + builder, + echoAsyncStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implement( + builder, + echoAsyncUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, echoBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_ + .implement(builder, echoClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, echoDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_ + .implement(builder, echoEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, echoEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, echoEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, echoFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, echoInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, echoInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, echoIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, echoNIAllNullableTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement( + builder, + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, echoNIAllTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNIAnotherEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_ + .implement(builder, echoNullableBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_ + .implement(builder, echoNullableIntWithAnInt_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_ + .implement(builder, echoNullableListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, echoNullableMapWithMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, echoStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, echoUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implement(builder, noopAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implement( + builder, + noopWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implement(builder, throwErrorFromVoidWithError_); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implement(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, throwFlutterErrorWithError_); + builder.addProtocol($protocol); + } + + /// Builds an object that implements the NIFlutterIntegrationCoreApiBridge protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NIFlutterIntegrationCoreApiBridge implementAsListener({ + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoMapWithMap_error_, + required NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithEverything_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + required NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + echoNIAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNIAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoNullableStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NiTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NiTestsError) noopWithError_, + required NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NiTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NiTestsError) throwErrorWithError_, + required void Function( + NiTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NiTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NIFlutterIntegrationCoreApiBridge', + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, echoBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_ + .implement(builder, echoClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, echoDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_ + .implement(builder, echoEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, echoEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, echoEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, echoFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, echoInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, echoInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, echoIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, echoNIAllNullableTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement( + builder, + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, echoNIAllTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNIAnotherEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_ + .implement(builder, echoNullableBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_ + .implement(builder, echoNullableIntWithAnInt_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_ + .implement(builder, echoNullableListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, echoNullableMapWithMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, echoStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, echoUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implementAsListener(builder, noopAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_ + .implementAsListener(builder, noopWithError_); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsListener(builder, throwErrorFromVoidWithError_); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsListener( + builder, + throwFlutterErrorAsyncWithError_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, throwFlutterErrorWithError_); + builder.addProtocol($protocol); + return NIFlutterIntegrationCoreApiBridge.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NIFlutterIntegrationCoreApiBridge protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsListener( + objc.ObjCProtocolBuilder builder, { + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoMapWithMap_error_, + required NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithEverything_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + required NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + echoNIAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNIAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoNullableStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NiTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NiTestsError) noopWithError_, + required NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NiTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NiTestsError) throwErrorWithError_, + required void Function( + NiTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NiTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, echoBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_ + .implement(builder, echoClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, echoDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_ + .implement(builder, echoEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, echoEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, echoEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, echoFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, echoInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, echoInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, echoIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, echoNIAllNullableTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement( + builder, + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, echoNIAllTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNIAnotherEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_ + .implement(builder, echoNullableBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_ + .implement(builder, echoNullableIntWithAnInt_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_ + .implement(builder, echoNullableListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, echoNullableMapWithMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, echoStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, echoUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implementAsListener(builder, noopAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_ + .implementAsListener(builder, noopWithError_); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsListener(builder, throwErrorFromVoidWithError_); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsListener( + builder, + throwFlutterErrorAsyncWithError_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, throwFlutterErrorWithError_); + builder.addProtocol($protocol); + } + + /// Builds an object that implements the NIFlutterIntegrationCoreApiBridge protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as blocking listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NIFlutterIntegrationCoreApiBridge implementAsBlocking({ + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoMapWithMap_error_, + required NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithEverything_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + required NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + echoNIAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNIAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoNullableStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NiTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NiTestsError) noopWithError_, + required NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NiTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NiTestsError) throwErrorWithError_, + required void Function( + NiTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NiTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NIFlutterIntegrationCoreApiBridge', + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, echoBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_ + .implement(builder, echoClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, echoDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_ + .implement(builder, echoEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, echoEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, echoEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, echoFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, echoInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, echoInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, echoIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, echoNIAllNullableTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement( + builder, + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, echoNIAllTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNIAnotherEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_ + .implement(builder, echoNullableBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_ + .implement(builder, echoNullableIntWithAnInt_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_ + .implement(builder, echoNullableListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, echoNullableMapWithMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, echoStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, echoUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implementAsBlocking(builder, noopAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_ + .implementAsBlocking(builder, noopWithError_); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsBlocking(builder, throwErrorFromVoidWithError_); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsBlocking( + builder, + throwFlutterErrorAsyncWithError_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, throwFlutterErrorWithError_); + builder.addProtocol($protocol); + return NIFlutterIntegrationCoreApiBridge.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NIFlutterIntegrationCoreApiBridge protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking + /// listeners will be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsBlocking( + objc.ObjCProtocolBuilder builder, { + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoMapWithMap_error_, + required NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithEverything_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + required NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + echoNIAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNIAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableEnumWithAnEnum_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt32ListWithList_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NiTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoNullableStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NiTestsError) + echoStringWithAString_error_, + required NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NiTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NiTestsError) noopWithError_, + required NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NiTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NiTestsError) throwErrorWithError_, + required void Function( + NiTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NiTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNIAllTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableBoolWithABool_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableInt32ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableInt64ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableIntWithAnInt_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableMapWithMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncObjectWithAnObject_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncStringMapWithStringMap_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncStringWithAString_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncUint8ListWithList_error_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, echoBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_ + .implement(builder, echoClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, echoDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_ + .implement(builder, echoEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, echoEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, echoEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, echoFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, echoInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, echoInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, echoIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithEverything_error_ + .implement(builder, echoNIAllNullableTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllNullableTypesWithoutRecursionWithEverything_error_ + .implement( + builder, + echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAllTypesWithEverything_error_ + .implement(builder, echoNIAllTypesWithEverything_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNIAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNIAnotherEnumWithAnotherEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_ + .implement(builder, echoNullableBoolWithABool_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_ + .implement(builder, echoNullableIntWithAnInt_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_ + .implement(builder, echoNullableListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, echoNullableMapWithMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, echoStringWithAString_error_); + NIFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, echoUint8ListWithList_error_); + NIFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implementAsBlocking(builder, noopAsyncWithError_completionHandler_); + NIFlutterIntegrationCoreApiBridge$Builder.noopWithError_ + .implementAsBlocking(builder, noopWithError_); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsBlocking(builder, throwErrorFromVoidWithError_); + NIFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NIFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsBlocking( + builder, + throwFlutterErrorAsyncWithError_completionHandler_, + ); + NIFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, throwFlutterErrorWithError_); + builder.addProtocol($protocol); + } + + /// echoAnotherAsyncEnumWithAnotherEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAnotherAsyncNullableEnumWithAnotherEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAnotherNullableEnumWithAnotherEnum_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAnotherNullableEnumWithAnotherEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAnotherNullableEnumWithAnotherEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// echoAsyncBoolWithABool:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncBoolWithABool_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncBoolWithABool_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncBoolWithABool_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncClassMapWithClassMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncClassMapWithClassMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassMapWithClassMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassMapWithClassMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncDoubleWithADouble:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncDoubleWithADouble_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncDoubleWithADouble_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncDoubleWithADouble_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncEnumMapWithEnumMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncEnumMapWithEnumMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncEnumWithAnEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncEnumWithAnEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumWithAnEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumWithAnEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncFloat64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncFloat64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncFloat64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncFloat64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncInt32ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncInt32ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt32ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt32ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncInt64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncInt64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncIntMapWithIntMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncIntMapWithIntMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntMapWithIntMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntMapWithIntMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncIntWithAnInt:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncIntWithAnInt_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntWithAnInt_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntWithAnInt_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncMapWithMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncMapWithMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncMapWithMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncMapWithMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNIAllTypesWithEverything:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNIAllTypesWithEverything_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNIAllTypesWithEverything_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNIAllTypesWithEverything_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllTypesBridge_NiTestsError_ffiVoidNIAllTypesBridge.fromFunction( + ( + ffi.Pointer _, + NIAllTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllTypesBridge_NiTestsError_ffiVoidNIAllTypesBridge.listener( + ( + ffi.Pointer _, + NIAllTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllTypesBridge_NiTestsError_ffiVoidNIAllTypesBridge.blocking( + ( + ffi.Pointer _, + NIAllTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNonNullClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNonNullClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNonNullEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableBoolWithABool:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableBoolWithABool_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableBoolWithABool_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableBoolWithABool_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableClassMapWithClassMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableClassMapWithClassMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableDoubleWithADouble:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableDoubleWithADouble_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableEnumMapWithEnumMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableEnumWithAnEnum:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableEnumWithAnEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableFloat64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableFloat64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableInt32ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableInt32ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableInt64ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableInt64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableIntMapWithIntMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableIntMapWithIntMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableIntWithAnInt:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableIntWithAnInt_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableMapWithMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableMapWithMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableMapWithMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableMapWithMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNIAllNullableTypesWithEverything:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesBridge_NiTestsError_ffiVoidNIAllNullableTypesBridge.fromFunction( + ( + ffi.Pointer _, + NIAllNullableTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock + arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesBridge_NiTestsError_ffiVoidNIAllNullableTypesBridge.listener( + ( + ffi.Pointer _, + NIAllNullableTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock + arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesBridge_NiTestsError_ffiVoidNIAllNullableTypesBridge.blocking( + ( + ffi.Pointer _, + NIAllNullableTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock + arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError_ffiVoidNIAllNullableTypesWithoutRecursionBridge.fromFunction( + ( + ffi.Pointer _, + NIAllNullableTypesWithoutRecursionBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError_ffiVoidNIAllNullableTypesWithoutRecursionBridge.listener( + ( + ffi.Pointer _, + NIAllNullableTypesWithoutRecursionBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError_ffiVoidNIAllNullableTypesWithoutRecursionBridge.blocking( + ( + ffi.Pointer _, + NIAllNullableTypesWithoutRecursionBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNonNullClassListWithClassList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNonNullEnumListWithEnumList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableObjectWithAnObject:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableObjectWithAnObject_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat.fromFunction( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat.listener( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat.blocking( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableStringMapWithStringMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableStringMapWithStringMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableStringWithAString:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableStringWithAString_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringWithAString_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringWithAString_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString.fromFunction( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString.listener( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString.blocking( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableUint8ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncNullableUint8ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncObjectWithAnObject:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncObjectWithAnObject_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncObjectWithAnObject_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncObjectWithAnObject_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat.fromFunction( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat.listener( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat.blocking( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncStringMapWithStringMap:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncStringMapWithStringMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringMapWithStringMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringMapWithStringMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncStringWithAString:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncStringWithAString_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringWithAString_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringWithAString_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString.fromFunction( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString.listener( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString.blocking( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncUint8ListWithList:error:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoAsyncUint8ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncUint8ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoAsyncUint8ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// Returns the passed boolean, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoBoolWithABool_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoBoolWithABool_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoBoolWithABool_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoClassListWithClassList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed double, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoDoubleWithADouble_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoDoubleWithADouble_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoDoubleWithADouble_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoEnumWithAnEnum_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoEnumWithAnEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoEnumWithAnEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed float64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoFloat64ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoFloat64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoFloat64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int32 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoInt32ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoInt32ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoInt32ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoInt64ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoInt64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoInt64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoIntWithAnInt_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoIntWithAnInt_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoIntWithAnInt_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoListWithList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoMapWithMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoMapWithMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoMapWithMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNIAllNullableTypesWithEverything_error_ = + objc.ObjCProtocolMethod< + NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAllNullableTypesWithEverything_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAllNullableTypesWithEverything_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NIAllNullableTypesBridge? Function( + NIAllNullableTypesBridge?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NIAllNullableTypesBridge_ffiVoid_NIAllNullableTypesBridge_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NIAllNullableTypesBridge? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNIAllNullableTypesWithoutRecursionWithEverything_error_ = + objc.ObjCProtocolMethod< + NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAllNullableTypesWithoutRecursionWithEverything_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NIAllNullableTypesWithoutRecursionBridge? Function( + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NIAllNullableTypesWithoutRecursionBridge_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NIAllNullableTypesWithoutRecursionBridge? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNIAllTypesWithEverything_error_ = + objc.ObjCProtocolMethod< + NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAllTypesWithEverything_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAllTypesWithEverything_error_, + isRequired: true, + isInstanceMethod: true, + ), + (NIAllTypesBridge? Function(NIAllTypesBridge?, NiTestsError) func) => + ObjCBlock_NIAllTypesBridge_ffiVoid_NIAllTypesBridge_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NIAllTypesBridge? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNIAnotherEnumWithAnotherEnum_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAnotherEnumWithAnotherEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNIAnotherEnumWithAnotherEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNonNullClassListWithClassList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNonNullClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNonNullEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNonNullEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNonNullIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNonNullStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNonNullStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed boolean, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableBoolWithABool_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableBoolWithABool_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableBoolWithABool_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableClassListWithClassList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed double, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableDoubleWithADouble_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableDoubleWithADouble_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableDoubleWithADouble_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableEnumWithAnEnum_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumWithAnEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumWithAnEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed float64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableFloat64ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableFloat64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableFloat64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int32 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableInt32ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt32ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt32ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int64 list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableInt64ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableIntWithAnInt_error_ = + objc.ObjCProtocolMethod< + objc.NSNumber? Function(objc.NSNumber?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntWithAnInt_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntWithAnInt_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NiTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableListWithList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableMapWithMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableMapWithMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableMapWithMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableNonNullClassListWithClassList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableNonNullClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableNonNullEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod< + objc.NSArray? Function(objc.NSArray?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NiTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableNonNullEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableNonNullIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableNonNullStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed string, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableStringWithAString_error_ = + objc.ObjCProtocolMethod< + objc.NSString? Function(objc.NSString?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringWithAString_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringWithAString_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSString? Function(objc.NSString?, NiTestsError) func) => + ObjCBlock_NSString_ffiVoid_NSString_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed byte list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoNullableUint8ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableUint8ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoNullableUint8ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NiTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed string, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoStringWithAString_error_ = + objc.ObjCProtocolMethod< + objc.NSString? Function(objc.NSString?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoStringWithAString_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoStringWithAString_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSString? Function(objc.NSString?, NiTestsError) func) => + ObjCBlock_NSString_ffiVoid_NSString_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSString? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed byte list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final echoUint8ListWithList_error_ = + objc.ObjCProtocolMethod< + NiTestsPigeonTypedData? Function(NiTestsPigeonTypedData?, NiTestsError) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoUint8ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_echoUint8ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NiTestsPigeonTypedData? Function( + NiTestsPigeonTypedData?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError.fromFunction( + ( + ffi.Pointer _, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final noopAsyncWithError_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NiTestsError, objc.ObjCBlock) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_noopAsyncWithError_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_jk1ljc) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_noopAsyncWithError_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function(NiTestsError, objc.ObjCBlock) func, + ) => ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoid.fromFunction( + ( + ffi.Pointer _, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ( + void Function(NiTestsError, objc.ObjCBlock) func, + ) => ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoid.listener( + ( + ffi.Pointer _, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ( + void Function(NiTestsError, objc.ObjCBlock) func, + ) => ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoid.blocking( + ( + ffi.Pointer _, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final noopWithError_ = + objc.ObjCProtocolListenableMethod( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_noopWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_noopWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NiTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError.fromFunction( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + (void Function(NiTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError.listener( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + (void Function(NiTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError.blocking( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + ); + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ = + objc.ObjCProtocolMethod< + NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_qfyidt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NIAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NIAllNullableTypesBridge_ffiVoid_NSNumber_NSNumber_NSString_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NiTestsError arg4, + ) => func(arg1, arg2, arg3, arg4), + ), + ); + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ = + objc.ObjCProtocolMethod< + NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_qfyidt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NIAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + func, + ) => + ObjCBlock_NIAllNullableTypesWithoutRecursionBridge_ffiVoid_NSNumber_NSNumber_NSString_NiTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NiTestsError arg4, + ) => func(arg1, arg2, arg3, arg4), + ), + ); + + /// Responds with an error from an async void function. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final throwErrorFromVoidWithError_ = + objc.ObjCProtocolListenableMethod( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwErrorFromVoidWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwErrorFromVoidWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NiTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError.fromFunction( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + (void Function(NiTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError.listener( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + (void Function(NiTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError.blocking( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + ); + + /// Responds with an error from an async function returning a value. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final throwErrorWithError_ = + objc.ObjCProtocolMethod( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwErrorWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_xr62hr) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwErrorWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSObject? Function(NiTestsError) func) => + ObjCBlock_NSObject_ffiVoid_NiTestsError.fromFunction( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + ); + + /// throwFlutterErrorAsyncWithError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final throwFlutterErrorAsyncWithError_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NiTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorAsyncWithError_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_jk1ljc) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorAsyncWithError_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoiddispatchdatat.fromFunction( + ( + ffi.Pointer _, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ( + void Function( + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoiddispatchdatat.listener( + ( + ffi.Pointer _, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ( + void Function( + NiTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoiddispatchdatat.blocking( + ( + ffi.Pointer _, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns a Flutter error, to test error handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static final throwFlutterErrorWithError_ = + objc.ObjCProtocolMethod( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_umaz4x_protocolTrampoline_xr62hr) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NIFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSObject? Function(NiTestsError) func) => + ObjCBlock_NSObject_ffiVoid_NiTestsError.fromFunction( + (ffi.Pointer _, NiTestsError arg1) => func(arg1), + ), + ); +} + +/// NIFlutterIntegrationCoreApiRegistrar +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIFlutterIntegrationCoreApiRegistrar._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIFlutterIntegrationCoreApiRegistrar] that points to the same underlying object as [other]. + NIFlutterIntegrationCoreApiRegistrar.as(objc.ObjCObject other) + : object$ = other { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiRegistrar', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIFlutterIntegrationCoreApiRegistrar] that wraps the given raw object pointer. + NIFlutterIntegrationCoreApiRegistrar.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiRegistrar', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIFlutterIntegrationCoreApiRegistrar]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIFlutterIntegrationCoreApiRegistrar, + ); + + /// alloc + static NIFlutterIntegrationCoreApiRegistrar alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NIFlutterIntegrationCoreApiRegistrar, + _sel_alloc, + ); + return NIFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NIFlutterIntegrationCoreApiRegistrar allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NIFlutterIntegrationCoreApiRegistrar, + _sel_allocWithZone_, + zone, + ); + return NIFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NIFlutterIntegrationCoreApiRegistrar new$() { + final $ret = _objc_msgSend_151sglz( + _class_NIFlutterIntegrationCoreApiRegistrar, + _sel_new, + ); + return NIFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// registerInstanceWithApi:name: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static void registerInstanceWithApi( + NIFlutterIntegrationCoreApiBridge api, { + required objc.NSString name, + }) { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiRegistrar.registerInstanceWithApi:name:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_pfv6jd( + _class_NIFlutterIntegrationCoreApiRegistrar, + _sel_registerInstanceWithApi_name_, + api.ref.pointer, + name.ref.pointer, + ); + } + + /// Returns a new instance of NIFlutterIntegrationCoreApiRegistrar constructed with the default `new` method. + NIFlutterIntegrationCoreApiRegistrar() : this.as(new$().object$); +} + +extension NIFlutterIntegrationCoreApiRegistrar$Methods + on NIFlutterIntegrationCoreApiRegistrar { + /// init + NIFlutterIntegrationCoreApiRegistrar init() { + objc.checkOsVersionInternal( + 'NIFlutterIntegrationCoreApiRegistrar.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } +} + +/// Generated setup class from Pigeon to register implemented NIHostIntegrationCoreApi classes. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIHostIntegrationCoreApiSetup._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIHostIntegrationCoreApiSetup] that points to the same underlying object as [other]. + NIHostIntegrationCoreApiSetup.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIHostIntegrationCoreApiSetup] that wraps the given raw object pointer. + NIHostIntegrationCoreApiSetup.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIHostIntegrationCoreApiSetup]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIHostIntegrationCoreApiSetup, + ); + + /// alloc + static NIHostIntegrationCoreApiSetup alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NIHostIntegrationCoreApiSetup, + _sel_alloc, + ); + return NIHostIntegrationCoreApiSetup.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NIHostIntegrationCoreApiSetup allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NIHostIntegrationCoreApiSetup, + _sel_allocWithZone_, + zone, + ); + return NIHostIntegrationCoreApiSetup.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// getInstanceWithName: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static NIHostIntegrationCoreApiSetup? getInstanceWithName( + objc.NSString name, + ) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.getInstanceWithName:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NIHostIntegrationCoreApiSetup, + _sel_getInstanceWithName_, + name.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIHostIntegrationCoreApiSetup.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// new + static NIHostIntegrationCoreApiSetup new$() { + final $ret = _objc_msgSend_151sglz( + _class_NIHostIntegrationCoreApiSetup, + _sel_new, + ); + return NIHostIntegrationCoreApiSetup.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// Returns a new instance of NIHostIntegrationCoreApiSetup constructed with the default `new` method. + NIHostIntegrationCoreApiSetup() : this.as(new$().object$); +} + +extension NIHostIntegrationCoreApiSetup$Methods + on NIHostIntegrationCoreApiSetup { + /// callFlutterEchoAnotherAsyncEnumWithAnotherEnum:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAnotherAsyncEnumWithAnotherEnum( + NIAnotherEnum anotherEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAnotherAsyncEnumWithAnotherEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1ht8su5( + object$.ref.pointer, + _sel_callFlutterEchoAnotherAsyncEnumWithAnotherEnum_wrappedError_completionHandler_, + anotherEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum_wrappedError_completionHandler_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAnotherNullableEnumWithAnotherEnum:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoAnotherNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAnotherNullableEnumWithAnotherEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoAnotherNullableEnumWithAnotherEnum_wrappedError_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoAsyncBoolWithABool:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncBoolWithABool( + bool aBool, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncBoolWithABool:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1oby3xk( + object$.ref.pointer, + _sel_callFlutterEchoAsyncBoolWithABool_wrappedError_completionHandler_, + aBool, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncClassListWithClassList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncClassListWithClassList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncClassListWithClassList_wrappedError_completionHandler_, + classList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncClassMapWithClassMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncClassMapWithClassMap( + objc.NSDictionary classMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncClassMapWithClassMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncClassMapWithClassMap_wrappedError_completionHandler_, + classMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncDoubleWithADouble:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncDoubleWithADouble( + double aDouble, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncDoubleWithADouble:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_f15nnv( + object$.ref.pointer, + _sel_callFlutterEchoAsyncDoubleWithADouble_wrappedError_completionHandler_, + aDouble, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncEnumListWithEnumList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncEnumListWithEnumList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncEnumListWithEnumList_wrappedError_completionHandler_, + enumList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncEnumMapWithEnumMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncEnumMapWithEnumMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncEnumMapWithEnumMap_wrappedError_completionHandler_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncEnumWithAnEnum:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncEnumWithAnEnum( + NIAnEnum anEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncEnumWithAnEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1yka6e5( + object$.ref.pointer, + _sel_callFlutterEchoAsyncEnumWithAnEnum_wrappedError_completionHandler_, + anEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncFloat64ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncFloat64ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncFloat64ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncFloat64ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncInt32ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncInt32ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncInt32ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncInt32ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncInt64ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncInt64ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncInt64ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncInt64ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncIntMapWithIntMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncIntMapWithIntMap( + objc.NSDictionary intMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncIntMapWithIntMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncIntMapWithIntMap_wrappedError_completionHandler_, + intMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncIntWithAnInt:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncIntWithAnInt( + int anInt, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncIntWithAnInt:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1bf2hie( + object$.ref.pointer, + _sel_callFlutterEchoAsyncIntWithAnInt_wrappedError_completionHandler_, + anInt, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncListWithList( + objc.NSArray list, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncMapWithMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncMapWithMap( + objc.NSDictionary map, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncMapWithMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncMapWithMap_wrappedError_completionHandler_, + map.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNIAllTypesWithEverything:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNIAllTypesWithEverything( + NIAllTypesBridge everything, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNIAllTypesWithEverything:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNIAllTypesWithEverything_wrappedError_completionHandler_, + everything.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNonNullClassListWithClassList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNonNullClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNonNullClassListWithClassList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNonNullClassListWithClassList_wrappedError_completionHandler_, + classList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNonNullEnumListWithEnumList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNonNullEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNonNullEnumListWithEnumList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNonNullEnumListWithEnumList_wrappedError_completionHandler_, + enumList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableBoolWithABool:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableBoolWithABool:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableBoolWithABool_wrappedError_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableClassListWithClassList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableClassListWithClassList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableClassListWithClassList_wrappedError_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableClassMapWithClassMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableClassMapWithClassMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableClassMapWithClassMap_wrappedError_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableDoubleWithADouble:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableDoubleWithADouble:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableDoubleWithADouble_wrappedError_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableEnumListWithEnumList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableEnumListWithEnumList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableEnumListWithEnumList_wrappedError_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableEnumMapWithEnumMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableEnumMapWithEnumMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableEnumMapWithEnumMap_wrappedError_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableEnumWithAnEnum:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableEnumWithAnEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableEnumWithAnEnum_wrappedError_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableFloat64ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableFloat64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableFloat64ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableFloat64ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableInt32ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableInt32ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableInt32ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableInt32ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableInt64ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableInt64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableInt64ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableInt64ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableIntMapWithIntMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableIntMapWithIntMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableIntMapWithIntMap_wrappedError_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableIntWithAnInt:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableIntWithAnInt:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableIntWithAnInt_wrappedError_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableListWithList( + objc.NSArray? list, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableMapWithMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableMapWithMap( + objc.NSDictionary? map, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableMapWithMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableMapWithMap_wrappedError_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything( + NIAllNullableTypesBridge? everything, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything( + NIAllNullableTypesWithoutRecursionBridge? everything, { + required NiTestsError wrappedError, + required objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNonNullClassListWithClassList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableNonNullClassListWithClassList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNonNullClassListWithClassList_wrappedError_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNonNullEnumListWithEnumList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableNonNullEnumListWithEnumList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNonNullEnumListWithEnumList_wrappedError_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableObjectWithAnObject:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableObjectWithAnObject( + objc.NSObject anObject, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableObjectWithAnObject:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableObjectWithAnObject_wrappedError_completionHandler_, + anObject.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableStringMapWithStringMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableStringMapWithStringMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableStringMapWithStringMap_wrappedError_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableStringWithAString:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableStringWithAString( + objc.NSString? aString, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableStringWithAString:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableStringWithAString_wrappedError_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableUint8ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncNullableUint8ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncNullableUint8ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableUint8ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncObjectWithAnObject:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncObjectWithAnObject( + objc.NSObject anObject, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncObjectWithAnObject:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncObjectWithAnObject_wrappedError_completionHandler_, + anObject.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncStringMapWithStringMap:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncStringMapWithStringMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncStringMapWithStringMap_wrappedError_completionHandler_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncStringWithAString:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncStringWithAString( + objc.NSString aString, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncStringWithAString:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncStringWithAString_wrappedError_completionHandler_, + aString.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncUint8ListWithList:wrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterEchoAsyncUint8ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoAsyncUint8ListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncUint8ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoBoolWithABool:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoBoolWithABool( + bool aBool, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoBoolWithABool:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_w1rg4f( + object$.ref.pointer, + _sel_callFlutterEchoBoolWithABool_wrappedError_, + aBool, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoClassListWithClassList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoClassListWithClassList_wrappedError_, + classList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoClassMapWithClassMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoClassMapWithClassMap( + objc.NSDictionary classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoClassMapWithClassMap_wrappedError_, + classMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoDoubleWithADouble:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoDoubleWithADouble( + double aDouble, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoDoubleWithADouble:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1ozwf6k( + object$.ref.pointer, + _sel_callFlutterEchoDoubleWithADouble_wrappedError_, + aDouble, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoEnumListWithEnumList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoEnumListWithEnumList_wrappedError_, + enumList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoEnumMapWithEnumMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoEnumMapWithEnumMap_wrappedError_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoEnumWithAnEnum:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoEnumWithAnEnum( + NIAnEnum anEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoEnumWithAnEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1k0qzru( + object$.ref.pointer, + _sel_callFlutterEchoEnumWithAnEnum_wrappedError_, + anEnum.value, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoFloat64ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoFloat64ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoFloat64ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoFloat64ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoInt32ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoInt32ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoInt32ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoInt32ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoInt64ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoInt64ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoInt64ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoInt64ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoIntMapWithIntMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoIntMapWithIntMap( + objc.NSDictionary intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoIntMapWithIntMap_wrappedError_, + intMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoIntWithAnInt:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoIntWithAnInt( + int anInt, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoIntWithAnInt:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1j962g9( + object$.ref.pointer, + _sel_callFlutterEchoIntWithAnInt_wrappedError_, + anInt, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoListWithList( + objc.NSArray list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoMapWithMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoMapWithMap( + objc.NSDictionary map, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoMapWithMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoMapWithMap_wrappedError_, + map.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNIAllNullableTypesWithEverything:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? callFlutterEchoNIAllNullableTypesWithEverything( + NIAllNullableTypesBridge? everything, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNIAllNullableTypesWithEverything:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNIAllNullableTypesWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything( + NIAllNullableTypesWithoutRecursionBridge? everything, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// callFlutterEchoNIAllTypesWithEverything:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllTypesBridge? callFlutterEchoNIAllTypesWithEverything( + NIAllTypesBridge everything, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNIAllTypesWithEverything:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNIAllTypesWithEverything_wrappedError_, + everything.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNIAnotherEnumWithAnotherEnum:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoNIAnotherEnumWithAnotherEnum( + NIAnotherEnum anotherEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNIAnotherEnumWithAnotherEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_ladeuy( + object$.ref.pointer, + _sel_callFlutterEchoNIAnotherEnumWithAnotherEnum_wrappedError_, + anotherEnum.value, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullClassListWithClassList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNonNullClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNonNullClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNonNullClassListWithClassList_wrappedError_, + classList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullClassMapWithClassMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNonNullClassMapWithClassMap( + objc.NSDictionary classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNonNullClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNonNullClassMapWithClassMap_wrappedError_, + classMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullEnumListWithEnumList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNonNullEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNonNullEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNonNullEnumListWithEnumList_wrappedError_, + enumList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullEnumMapWithEnumMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNonNullEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNonNullEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNonNullEnumMapWithEnumMap_wrappedError_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullIntMapWithIntMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNonNullIntMapWithIntMap( + objc.NSDictionary intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNonNullIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNonNullIntMapWithIntMap_wrappedError_, + intMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullStringMapWithStringMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNonNullStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNonNullStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNonNullStringMapWithStringMap_wrappedError_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableBoolWithABool:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoNullableBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableBoolWithABool:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableBoolWithABool_wrappedError_, + aBool?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableClassListWithClassList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNullableClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableClassListWithClassList_wrappedError_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableClassMapWithClassMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableClassMapWithClassMap_wrappedError_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableDoubleWithADouble:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableDoubleWithADouble:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableDoubleWithADouble_wrappedError_, + aDouble?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableEnumListWithEnumList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableEnumListWithEnumList_wrappedError_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableEnumMapWithEnumMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableEnumMapWithEnumMap_wrappedError_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableEnumWithAnEnum:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableEnumWithAnEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableEnumWithAnEnum_wrappedError_, + anEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableFloat64ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoNullableFloat64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableFloat64ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableFloat64ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableInt32ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoNullableInt32ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableInt32ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableInt32ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableInt64ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoNullableInt64ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableInt64ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableInt64ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableIntMapWithIntMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableIntMapWithIntMap_wrappedError_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableIntWithAnInt:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? callFlutterEchoNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableIntWithAnInt:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableIntWithAnInt_wrappedError_, + anInt?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNullableListWithList( + objc.NSArray? list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableMapWithMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableMapWithMap( + objc.NSDictionary? map, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableMapWithMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableMapWithMap_wrappedError_, + map?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableNonNullClassListWithClassList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableNonNullClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableNonNullClassListWithClassList_wrappedError_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableNonNullClassMapWithClassMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableNonNullClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableNonNullClassMapWithClassMap_wrappedError_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableNonNullEnumListWithEnumList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? callFlutterEchoNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableNonNullEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableNonNullEnumListWithEnumList_wrappedError_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableNonNullEnumMapWithEnumMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableNonNullEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableNonNullEnumMapWithEnumMap_wrappedError_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableNonNullIntMapWithIntMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableNonNullIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableNonNullIntMapWithIntMap_wrappedError_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableNonNullStringMapWithStringMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableNonNullStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableNonNullStringMapWithStringMap_wrappedError_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableStringMapWithStringMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableStringMapWithStringMap_wrappedError_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableStringWithAString:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? callFlutterEchoNullableStringWithAString( + objc.NSString? aString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableStringWithAString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableStringWithAString_wrappedError_, + aString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableUint8ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoNullableUint8ListWithList( + NiTestsPigeonTypedData? list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoNullableUint8ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableUint8ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoStringMapWithStringMap:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? callFlutterEchoStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoStringMapWithStringMap_wrappedError_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoStringWithAString:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? callFlutterEchoStringWithAString( + objc.NSString aString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoStringWithAString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoStringWithAString_wrappedError_, + aString.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoUint8ListWithList:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? callFlutterEchoUint8ListWithList( + NiTestsPigeonTypedData list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterEchoUint8ListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoUint8ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterNoopAsyncWithWrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterNoopAsyncWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterNoopAsyncWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_callFlutterNoopAsyncWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Spawns a background thread and calls noop on the [NIFlutterIntegrationCoreApi]. + /// Returns the result of whether the flutter call was successful. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterNoopOnBackgroundThreadWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterNoopOnBackgroundThreadWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_callFlutterNoopOnBackgroundThreadWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterNoopWithWrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterNoopWithWrappedError(NiTestsError wrappedError) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterNoopWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_callFlutterNoopWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// callFlutterSendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? + callFlutterSendMultipleNullableTypesWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterSendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_s92gih( + object$.ref.pointer, + _sel_callFlutterSendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_wrappedError_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_s92gih( + object$.ref.pointer, + _sel_callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_wrappedError_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// callFlutterThrowErrorFromVoidWithWrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterThrowErrorFromVoidWithWrappedError( + NiTestsError wrappedError, + ) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterThrowErrorFromVoidWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_callFlutterThrowErrorFromVoidWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// callFlutterThrowErrorWithWrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? callFlutterThrowErrorWithWrappedError( + NiTestsError wrappedError, + ) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterThrowErrorWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_callFlutterThrowErrorWithWrappedError_, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterThrowFlutterErrorAsyncWithWrappedError:completionHandler: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void callFlutterThrowFlutterErrorAsyncWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.callFlutterThrowFlutterErrorAsyncWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_callFlutterThrowFlutterErrorAsyncWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the inner aString value from the wrapped object, to test + /// sending of nested objects. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllClassesWrapperBridge? createNestedNullableStringWithNullableString( + objc.NSString? nullableString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.createNestedNullableStringWithNullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_createNestedNullableStringWithNullableString_wrappedError_, + nullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns true if the handler is run on a main thread. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? defaultIsMainThreadWithWrappedError( + NiTestsError wrappedError, + ) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.defaultIsMainThreadWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_defaultIsMainThreadWithWrappedError_, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? echoAllNullableTypesWithEverything( + NIAllNullableTypesBridge? everything, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAllNullableTypesWithEverything:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAllNullableTypesWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + echoAllNullableTypesWithoutRecursionWithEverything( + NIAllNullableTypesWithoutRecursionBridge? everything, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAllNullableTypesWithoutRecursionWithEverything:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAllNullableTypesWithoutRecursionWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllTypesBridge? echoAllTypesWithEverything( + NIAllTypesBridge everything, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAllTypesWithEverything:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAllTypesWithEverything_wrappedError_, + everything.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAnotherAsyncEnumWithAnotherEnum( + NIAnotherEnum anotherEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAnotherAsyncEnumWithAnotherEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1ht8su5( + object$.ref.pointer, + _sel_echoAnotherAsyncEnumWithAnotherEnum_wrappedError_completionHandler_, + anotherEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAnotherAsyncNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAnotherAsyncNullableEnumWithAnotherEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_wrappedError_completionHandler_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoAnotherEnumWithAnotherEnum( + NIAnotherEnum anotherEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAnotherEnumWithAnotherEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_ladeuy( + object$.ref.pointer, + _sel_echoAnotherEnumWithAnotherEnum_wrappedError_, + anotherEnum.value, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// echoAnotherNullableEnumWithAnotherEnum:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoAnotherNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAnotherNullableEnumWithAnotherEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAnotherNullableEnumWithAnotherEnum_wrappedError_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in boolean asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncBoolWithABool( + bool aBool, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncBoolWithABool:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1oby3xk( + object$.ref.pointer, + _sel_echoAsyncBoolWithABool_wrappedError_completionHandler_, + aBool, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncClassListWithClassList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassListWithClassList_wrappedError_completionHandler_, + classList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncClassMapWithClassMap( + objc.NSDictionary classMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncClassMapWithClassMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassMapWithClassMap_wrappedError_completionHandler_, + classMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns passed in double asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncDoubleWithADouble( + double aDouble, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncDoubleWithADouble:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_f15nnv( + object$.ref.pointer, + _sel_echoAsyncDoubleWithADouble_wrappedError_completionHandler_, + aDouble, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncEnumListWithEnumList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumListWithEnumList_wrappedError_completionHandler_, + enumList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncEnumMapWithEnumMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumMapWithEnumMap_wrappedError_completionHandler_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncEnumWithAnEnum( + NIAnEnum anEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncEnumWithAnEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1yka6e5( + object$.ref.pointer, + _sel_echoAsyncEnumWithAnEnum_wrappedError_completionHandler_, + anEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Float64List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncFloat64ListWithAFloat64List( + NiTestsPigeonTypedData aFloat64List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncFloat64ListWithAFloat64List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncFloat64ListWithAFloat64List_wrappedError_completionHandler_, + aFloat64List.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Int32List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncInt32ListWithAInt32List( + NiTestsPigeonTypedData aInt32List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncInt32ListWithAInt32List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncInt32ListWithAInt32List_wrappedError_completionHandler_, + aInt32List.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Int64List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncInt64ListWithAInt64List( + NiTestsPigeonTypedData aInt64List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncInt64ListWithAInt64List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncInt64ListWithAInt64List_wrappedError_completionHandler_, + aInt64List.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncIntMapWithIntMap( + objc.NSDictionary intMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncIntMapWithIntMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncIntMapWithIntMap_wrappedError_completionHandler_, + intMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns passed in int asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncIntWithAnInt( + int anInt, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncIntWithAnInt:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_1bf2hie( + object$.ref.pointer, + _sel_echoAsyncIntWithAnInt_wrappedError_completionHandler_, + anInt, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncListWithList( + objc.NSArray list, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncMapWithMap( + objc.NSDictionary map, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncMapWithMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncMapWithMap_wrappedError_completionHandler_, + map.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed object, to test async serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNIAllTypesWithEverything( + NIAllTypesBridge everything, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNIAllTypesWithEverything:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNIAllTypesWithEverything_wrappedError_completionHandler_, + everything.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in boolean asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableBoolWithABool( + objc.NSNumber? aBool, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableBoolWithABool:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableBoolWithABool_wrappedError_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableClassListWithClassList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableClassListWithClassList_wrappedError_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableClassMapWithClassMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableClassMapWithClassMap_wrappedError_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns passed in double asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableDoubleWithADouble:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableDoubleWithADouble_wrappedError_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableEnumListWithEnumList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumListWithEnumList_wrappedError_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableEnumMapWithEnumMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumMapWithEnumMap_wrappedError_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableEnumWithAnEnum:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumWithAnEnum_wrappedError_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Float64List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableFloat64ListWithAFloat64List( + NiTestsPigeonTypedData? aFloat64List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableFloat64ListWithAFloat64List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableFloat64ListWithAFloat64List_wrappedError_completionHandler_, + aFloat64List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Int32List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableInt32ListWithAInt32List( + NiTestsPigeonTypedData? aInt32List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableInt32ListWithAInt32List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableInt32ListWithAInt32List_wrappedError_completionHandler_, + aInt32List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Int64List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableInt64ListWithAInt64List( + NiTestsPigeonTypedData? aInt64List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableInt64ListWithAInt64List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableInt64ListWithAInt64List_wrappedError_completionHandler_, + aInt64List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableIntMapWithIntMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableIntMapWithIntMap_wrappedError_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns passed in int asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableIntWithAnInt:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableIntWithAnInt_wrappedError_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableListWithList( + objc.NSArray? list, { + required NiTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableListWithList:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableMapWithMap( + objc.NSDictionary? map, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableMapWithMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableMapWithMap_wrappedError_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableNIAllNullableTypesWithEverything( + NIAllNullableTypesBridge? everything, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableNIAllNullableTypesWithEverything:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNIAllNullableTypesWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything( + NIAllNullableTypesWithoutRecursionBridge? everything, { + required NiTestsError wrappedError, + required objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in generic Object asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableObjectWithAnObject( + objc.NSObject anObject, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableObjectWithAnObject:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableObjectWithAnObject_wrappedError_completionHandler_, + anObject.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableStringMapWithStringMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableStringMapWithStringMap_wrappedError_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed string asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableStringWithAString( + objc.NSString? aString, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableStringWithAString:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableStringWithAString_wrappedError_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Uint8List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncNullableUint8ListWithAUint8List( + NiTestsPigeonTypedData? aUint8List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncNullableUint8ListWithAUint8List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableUint8ListWithAUint8List_wrappedError_completionHandler_, + aUint8List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in generic Object asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncObjectWithAnObject( + objc.NSObject anObject, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncObjectWithAnObject:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncObjectWithAnObject_wrappedError_completionHandler_, + anObject.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed map, to test asynchronous serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncStringMapWithStringMap:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringMapWithStringMap_wrappedError_completionHandler_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed string asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncStringWithAString( + objc.NSString aString, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncStringWithAString:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringWithAString_wrappedError_completionHandler_, + aString.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Uint8List asynchronously. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void echoAsyncUint8ListWithAUint8List( + NiTestsPigeonTypedData aUint8List, { + required NiTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoAsyncUint8ListWithAUint8List:wrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncUint8ListWithAUint8List_wrappedError_completionHandler_, + aUint8List.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoBoolListWithBoolList( + objc.NSArray boolList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoBoolListWithBoolList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoBoolListWithBoolList_wrappedError_, + boolList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in boolean. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoBoolWithABool( + bool aBool, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoBoolWithABool:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_w1rg4f( + object$.ref.pointer, + _sel_echoBoolWithABool_wrappedError_, + aBool, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoClassListWithClassList_wrappedError_, + classList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoClassMapWithClassMap( + objc.NSDictionary classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoClassMapWithClassMap_wrappedError_, + classMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed class to test nested class serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllClassesWrapperBridge? echoClassWrapperWithWrapper( + NIAllClassesWrapperBridge wrapper, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoClassWrapperWithWrapper:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoClassWrapperWithWrapper_wrappedError_, + wrapper.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllClassesWrapperBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoDoubleListWithDoubleList( + objc.NSArray doubleList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoDoubleListWithDoubleList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoDoubleListWithDoubleList_wrappedError_, + doubleList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in double. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoDoubleWithADouble( + double aDouble, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoDoubleWithADouble:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1ozwf6k( + object$.ref.pointer, + _sel_echoDoubleWithADouble_wrappedError_, + aDouble, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoEnumListWithEnumList_wrappedError_, + enumList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoEnumMapWithEnumMap_wrappedError_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoEnumWithAnEnum( + NIAnEnum anEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoEnumWithAnEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1k0qzru( + object$.ref.pointer, + _sel_echoEnumWithAnEnum_wrappedError_, + anEnum.value, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Float64List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoFloat64ListWithAFloat64List( + NiTestsPigeonTypedData aFloat64List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoFloat64ListWithAFloat64List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoFloat64ListWithAFloat64List_wrappedError_, + aFloat64List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int32List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoInt32ListWithAInt32List( + NiTestsPigeonTypedData aInt32List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoInt32ListWithAInt32List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt32ListWithAInt32List_wrappedError_, + aInt32List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int64List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoInt64ListWithAInt64List( + NiTestsPigeonTypedData aInt64List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoInt64ListWithAInt64List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt64ListWithAInt64List_wrappedError_, + aInt64List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoIntListWithIntList( + objc.NSArray intList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoIntListWithIntList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoIntListWithIntList_wrappedError_, + intList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoIntMapWithIntMap( + objc.NSDictionary intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoIntMapWithIntMap_wrappedError_, + intMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in int. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoIntWithAnInt( + int anInt, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoIntWithAnInt:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1j962g9( + object$.ref.pointer, + _sel_echoIntWithAnInt_wrappedError_, + anInt, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoListWithList( + objc.NSArray list, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoListWithList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoMapWithMap( + objc.NSDictionary map, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoMapWithMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoMapWithMap_wrappedError_, + map.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the default string. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? echoNamedDefaultStringWithAString( + objc.NSString aString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNamedDefaultStringWithAString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNamedDefaultStringWithAString_wrappedError_, + aString.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in string. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? echoNamedNullableStringWithANullableString( + objc.NSString? aNullableString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNamedNullableStringWithANullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNamedNullableStringWithANullableString_wrappedError_, + aNullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNonNullClassListWithClassList( + objc.NSArray classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNonNullClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullClassListWithClassList_wrappedError_, + classList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullClassMapWithClassMap( + objc.NSDictionary classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNonNullClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullClassMapWithClassMap_wrappedError_, + classMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNonNullEnumListWithEnumList( + objc.NSArray enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNonNullEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullEnumListWithEnumList_wrappedError_, + enumList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNonNullEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullEnumMapWithEnumMap_wrappedError_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullIntMapWithIntMap( + objc.NSDictionary intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNonNullIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullIntMapWithIntMap_wrappedError_, + intMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNonNullStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNonNullStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNonNullStringMapWithStringMap_wrappedError_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in boolean. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableBoolWithANullableBool( + objc.NSNumber? aNullableBool, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableBoolWithANullableBool:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableBoolWithANullableBool_wrappedError_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableClassListWithClassList_wrappedError_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableClassMapWithClassMap_wrappedError_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in double. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableDoubleWithANullableDouble( + objc.NSNumber? aNullableDouble, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableDoubleWithANullableDouble:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableDoubleWithANullableDouble_wrappedError_, + aNullableDouble?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableEnumListWithEnumList_wrappedError_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableEnumMapWithEnumMap_wrappedError_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// echoNullableEnumWithAnEnum:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableEnumWithAnEnum:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableEnumWithAnEnum_wrappedError_, + anEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Float64List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableFloat64ListWithANullableFloat64List( + NiTestsPigeonTypedData? aNullableFloat64List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableFloat64ListWithANullableFloat64List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableFloat64ListWithANullableFloat64List_wrappedError_, + aNullableFloat64List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int32List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableInt32ListWithANullableInt32List( + NiTestsPigeonTypedData? aNullableInt32List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableInt32ListWithANullableInt32List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt32ListWithANullableInt32List_wrappedError_, + aNullableInt32List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int64List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableInt64ListWithANullableInt64List( + NiTestsPigeonTypedData? aNullableInt64List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableInt64ListWithANullableInt64List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt64ListWithANullableInt64List_wrappedError_, + aNullableInt64List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableIntMapWithIntMap_wrappedError_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in int. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoNullableIntWithANullableInt( + objc.NSNumber? aNullableInt, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableIntWithANullableInt:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableIntWithANullableInt_wrappedError_, + aNullableInt?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableListWithANullableList( + objc.NSArray? aNullableList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableListWithANullableList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableListWithANullableList_wrappedError_, + aNullableList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableMapWithMap( + objc.NSDictionary? map, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableMapWithMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableMapWithMap_wrappedError_, + map?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableNonNullClassListWithClassList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullClassListWithClassList_wrappedError_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableNonNullClassMapWithClassMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullClassMapWithClassMap_wrappedError_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableNonNullEnumListWithEnumList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullEnumListWithEnumList_wrappedError_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableNonNullEnumMapWithEnumMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullEnumMapWithEnumMap_wrappedError_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableNonNullIntMapWithIntMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullIntMapWithIntMap_wrappedError_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableNonNullStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableNonNullStringMapWithStringMap_wrappedError_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in generic Object. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? echoNullableObjectWithANullableObject( + objc.NSObject aNullableObject, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableObjectWithANullableObject:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableObjectWithANullableObject_wrappedError_, + aNullableObject.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableStringMapWithStringMap_wrappedError_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in string. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? echoNullableStringWithANullableString( + objc.NSString? aNullableString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableStringWithANullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableStringWithANullableString_wrappedError_, + aNullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Uint8List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoNullableUint8ListWithANullableUint8List( + NiTestsPigeonTypedData? aNullableUint8List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoNullableUint8ListWithANullableUint8List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableUint8ListWithANullableUint8List_wrappedError_, + aNullableUint8List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in generic Object. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? echoObjectWithAnObject( + objc.NSObject anObject, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoObjectWithAnObject:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoObjectWithAnObject_wrappedError_, + anObject.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in double. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoOptionalDefaultDoubleWithADouble( + double aDouble, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoOptionalDefaultDoubleWithADouble:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1ozwf6k( + object$.ref.pointer, + _sel_echoOptionalDefaultDoubleWithADouble_wrappedError_, + aDouble, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in int. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoOptionalNullableIntWithANullableInt( + objc.NSNumber? aNullableInt, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoOptionalNullableIntWithANullableInt:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoOptionalNullableIntWithANullableInt_wrappedError_, + aNullableInt?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in int. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSNumber? echoRequiredIntWithAnInt( + int anInt, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoRequiredIntWithAnInt:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1j962g9( + object$.ref.pointer, + _sel_echoRequiredIntWithAnInt_wrappedError_, + anInt, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSArray? echoStringListWithStringList( + objc.NSArray stringList, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoStringListWithStringList:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoStringListWithStringList_wrappedError_, + stringList.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSDictionary? echoStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoStringMapWithStringMap:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoStringMapWithStringMap_wrappedError_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in string. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? echoStringWithAString( + objc.NSString aString, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoStringWithAString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoStringWithAString_wrappedError_, + aString.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Uint8List. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData? echoUint8ListWithAUint8List( + NiTestsPigeonTypedData aUint8List, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.echoUint8ListWithAUint8List:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoUint8ListWithAUint8List_wrappedError_, + aUint8List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the inner aString value from the wrapped object, to test + /// sending of nested objects. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSString? extractNestedNullableStringWithWrapper( + NIAllClassesWrapperBridge wrapper, { + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.extractNestedNullableStringWithWrapper:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_extractNestedNullableStringWithWrapper_wrappedError_, + wrapper.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// init + NIHostIntegrationCoreApiSetup init() { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIHostIntegrationCoreApiSetup.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void noopAsyncWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.noopAsyncWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_noopAsyncWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void noopWithWrappedError(NiTestsError wrappedError) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.noopWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_noopWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// sendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesBridge? sendMultipleNullableTypesWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.sendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_s92gih( + object$.ref.pointer, + _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_wrappedError_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// sendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIAllNullableTypesWithoutRecursionBridge? + sendMultipleNullableTypesWithoutRecursionWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NiTestsError wrappedError, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.sendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_s92gih( + object$.ref.pointer, + _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_wrappedError_, + aNullableBool?.ref.pointer ?? ffi.nullptr, + aNullableInt?.ref.pointer ?? ffi.nullptr, + aNullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Responds with an error from an async void function. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void throwAsyncErrorFromVoidWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.throwAsyncErrorFromVoidWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_throwAsyncErrorFromVoidWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Responds with an error from an async function returning a value. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void throwAsyncErrorWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.throwAsyncErrorWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_throwAsyncErrorWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Responds with a Flutter error from an async function returning a value. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void throwAsyncFlutterErrorWithWrappedError( + NiTestsError wrappedError, { + required objc.ObjCBlock + completionHandler, + }) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.throwAsyncFlutterErrorWithWrappedError:completionHandler:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_throwAsyncFlutterErrorWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns an error from a void function, to test error handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + void throwErrorFromVoidWithWrappedError(NiTestsError wrappedError) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.throwErrorFromVoidWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_throwErrorFromVoidWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// Returns an error, to test error handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? throwErrorWithWrappedError(NiTestsError wrappedError) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.throwErrorWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_throwErrorWithWrappedError_, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// Returns a Flutter error, to test error handling. + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? throwFlutterErrorWithWrappedError(NiTestsError wrappedError) { + objc.checkOsVersionInternal( + 'NIHostIntegrationCoreApiSetup.throwFlutterErrorWithWrappedError:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_throwFlutterErrorWithWrappedError_, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } +} + +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NIUnusedClassBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NIUnusedClassBridge] that points to the same underlying object as [other]. + NIUnusedClassBridge.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NIUnusedClassBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NIUnusedClassBridge] that wraps the given raw object pointer. + NIUnusedClassBridge.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NIUnusedClassBridge', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NIUnusedClassBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NIUnusedClassBridge, + ); + + /// alloc + static NIUnusedClassBridge alloc() { + final $ret = _objc_msgSend_151sglz(_class_NIUnusedClassBridge, _sel_alloc); + return NIUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NIUnusedClassBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NIUnusedClassBridge, + _sel_allocWithZone_, + zone, + ); + return NIUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// new + static NIUnusedClassBridge new$() { + final $ret = _objc_msgSend_151sglz(_class_NIUnusedClassBridge, _sel_new); + return NIUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NIUnusedClassBridge constructed with the default `new` method. + NIUnusedClassBridge() : this.as(new$().object$); +} + +extension NIUnusedClassBridge$Methods on NIUnusedClassBridge { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSObject? get aField { + objc.checkOsVersionInternal( + 'NIUnusedClassBridge.aField', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aField); + return $ret.address == 0 + ? null + : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// init + NIUnusedClassBridge init() { + objc.checkOsVersionInternal( + 'NIUnusedClassBridge.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NIUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// initWithAField: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NIUnusedClassBridge initWithAField(objc.NSObject? aField) { + objc.checkOsVersionInternal( + 'NIUnusedClassBridge.initWithAField:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + object$.ref.retainAndReturnPointer(), + _sel_initWithAField_, + aField?.ref.pointer ?? ffi.nullptr, + ); + return NIUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + set aField(objc.NSObject? value) { + objc.checkOsVersionInternal( + 'NIUnusedClassBridge.setAField:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAField_, + value?.ref.pointer ?? ffi.nullptr, + ); + } +} + +/// NSClientCertificate +extension NSClientCertificate on NSURLCredential { + /// certificates + objc.NSArray get certificates { + objc.checkOsVersionInternal( + 'NSURLCredential.certificates', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_certificates); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// identity + ffi.Pointer<__SecIdentity> get identity { + objc.checkOsVersionInternal( + 'NSURLCredential.identity', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + return _objc_msgSend_nkb3zz(object$.ref.pointer, _sel_identity); + } + + /// credentialWithIdentity:certificates:persistence: + static NSURLCredential credentialWithIdentity( + ffi.Pointer<__SecIdentity> identity, { + objc.NSArray? certificates, + required NSURLCredentialPersistence persistence, + }) { + objc.checkOsVersionInternal( + 'NSURLCredential.credentialWithIdentity:certificates:persistence:', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_jfo4g1( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certificates?.ref.pointer ?? ffi.nullptr, + persistence.value, + ); + return NSURLCredential.fromPointer($ret, retain: true, release: true); + } +} + +/// NSInternetPassword +extension NSInternetPassword on NSURLCredential { + /// hasPassword + bool get hasPassword { + objc.checkOsVersionInternal( + 'NSURLCredential.hasPassword', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + return _objc_msgSend_91o635(object$.ref.pointer, _sel_hasPassword); + } + + /// password + objc.NSString? get password { + objc.checkOsVersionInternal( + 'NSURLCredential.password', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_password); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// user + objc.NSString? get user { + objc.checkOsVersionInternal( + 'NSURLCredential.user', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_user); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// credentialWithUser:password:persistence: + static NSURLCredential credentialWithUser( + objc.NSString user, { + required objc.NSString password, + required NSURLCredentialPersistence persistence, + }) { + objc.checkOsVersionInternal( + 'NSURLCredential.credentialWithUser:password:persistence:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + final $ret = _objc_msgSend_17ns785( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.ref.pointer, + password.ref.pointer, + persistence.value, + ); + return NSURLCredential.fromPointer($ret, retain: true, release: true); + } +} + +/// NSServerTrust +extension NSServerTrust on NSURLCredential { + /// credentialForTrust: + static NSURLCredential credentialForTrust(ffi.Pointer<__SecTrust> trust) { + objc.checkOsVersionInternal( + 'NSURLCredential.credentialForTrust:', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1s3ecd1( + _class_NSURLCredential, + _sel_credentialForTrust_, + trust, + ); + return NSURLCredential.fromPointer($ret, retain: true, release: true); + } +} + +/// NSURLCredential +extension type NSURLCredential._(objc.ObjCObject object$) + implements + objc.ObjCObject, + objc.NSObject, + objc.NSSecureCoding, + objc.NSCopying { + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSURLCredential', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSURLCredential', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSURLCredential, + ); + + /// alloc + static NSURLCredential alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSURLCredential, _sel_alloc); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSURLCredential allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSURLCredential, + _sel_allocWithZone_, + zone, + ); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSURLCredential new$() { + final $ret = _objc_msgSend_151sglz(_class_NSURLCredential, _sel_new); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSURLCredential, + _sel_supportsSecureCoding, + ); + } + + /// Returns a new instance of NSURLCredential constructed with the default `new` method. + NSURLCredential() : this.as(new$().object$); +} + +extension NSURLCredential$Methods on NSURLCredential { + /// encodeWithCoder: + void encodeWithCoder(objc.NSCoder coder) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_encodeWithCoder_, + coder.ref.pointer, + ); + } + + /// init + NSURLCredential init() { + objc.checkOsVersionInternal( + 'NSURLCredential.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// initWithCoder: + NSURLCredential? initWithCoder(objc.NSCoder coder) { + final $ret = _objc_msgSend_1sotr3r( + object$.ref.retainAndReturnPointer(), + _sel_initWithCoder_, + coder.ref.pointer, + ); + return $ret.address == 0 + ? null + : NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// initWithIdentity:certificates:persistence: + NSURLCredential initWithIdentity( + ffi.Pointer<__SecIdentity> identity, { + objc.NSArray? certificates, + required NSURLCredentialPersistence persistence, + }) { + objc.checkOsVersionInternal( + 'NSURLCredential.initWithIdentity:certificates:persistence:', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_jfo4g1( + object$.ref.retainAndReturnPointer(), + _sel_initWithIdentity_certificates_persistence_, + identity, + certificates?.ref.pointer ?? ffi.nullptr, + persistence.value, + ); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// initWithTrust: + NSURLCredential initWithTrust(ffi.Pointer<__SecTrust> trust) { + objc.checkOsVersionInternal( + 'NSURLCredential.initWithTrust:', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1s3ecd1( + object$.ref.retainAndReturnPointer(), + _sel_initWithTrust_, + trust, + ); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// initWithUser:password:persistence: + NSURLCredential initWithUser( + objc.NSString user, { + required objc.NSString password, + required NSURLCredentialPersistence persistence, + }) { + objc.checkOsVersionInternal( + 'NSURLCredential.initWithUser:password:persistence:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + final $ret = _objc_msgSend_17ns785( + object$.ref.retainAndReturnPointer(), + _sel_initWithUser_password_persistence_, + user.ref.pointer, + password.ref.pointer, + persistence.value, + ); + return NSURLCredential.fromPointer($ret, retain: false, release: true); + } + + /// persistence + NSURLCredentialPersistence get persistence { + objc.checkOsVersionInternal( + 'NSURLCredential.persistence', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 2, 0)), + ); + final $ret = _objc_msgSend_bscj0h(object$.ref.pointer, _sel_persistence); + return NSURLCredentialPersistence.fromValue($ret); + } +} + +enum NSURLCredentialPersistence { + NSURLCredentialPersistenceNone(0), + NSURLCredentialPersistenceForSession(1), + NSURLCredentialPersistencePermanent(2), + NSURLCredentialPersistenceSynchronizable(3); + + final int value; + const NSURLCredentialPersistence(this.value); + + static NSURLCredentialPersistence fromValue(int value) => switch (value) { + 0 => NSURLCredentialPersistenceNone, + 1 => NSURLCredentialPersistenceForSession, + 2 => NSURLCredentialPersistencePermanent, + 3 => NSURLCredentialPersistenceSynchronizable, + _ => throw ArgumentError( + 'Unknown value for NSURLCredentialPersistence: $value', + ), + }; +} + +/// Error class for passing custom error details to Dart side. +extension type NiTestsError._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NiTestsError] that points to the same underlying object as [other]. + NiTestsError.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NiTestsError] that wraps the given raw object pointer. + NiTestsError.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NiTestsError]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NiTestsError, + ); + + /// alloc + static NiTestsError alloc() { + final $ret = _objc_msgSend_151sglz(_class_NiTestsError, _sel_alloc); + return NiTestsError.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NiTestsError allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NiTestsError, + _sel_allocWithZone_, + zone, + ); + return NiTestsError.fromPointer($ret, retain: false, release: true); + } + + /// new + static NiTestsError new$() { + final $ret = _objc_msgSend_151sglz(_class_NiTestsError, _sel_new); + return NiTestsError.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NiTestsError constructed with the default `new` method. + NiTestsError() : this.as(new$().object$); +} + +extension NiTestsError$Methods on NiTestsError { + /// code + objc.NSString? get code { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_code); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// details + objc.NSString? get details { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_details); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// init + NiTestsError init() { + objc.checkOsVersionInternal( + 'NiTestsError.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NiTestsError.fromPointer($ret, retain: false, release: true); + } + + /// initWithCode:message:details: + NiTestsError initWithCode( + objc.NSString? code, { + objc.NSString? message, + objc.NSString? details, + }) { + final $ret = _objc_msgSend_11spmsz( + object$.ref.retainAndReturnPointer(), + _sel_initWithCode_message_details_, + code?.ref.pointer ?? ffi.nullptr, + message?.ref.pointer ?? ffi.nullptr, + details?.ref.pointer ?? ffi.nullptr, + ); + return NiTestsError.fromPointer($ret, retain: false, release: true); + } + + /// message + objc.NSString? get message { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_message); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// setCode: + set code(objc.NSString? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setCode_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setDetails: + set details(objc.NSString? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setDetails_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setMessage: + set message(objc.NSString? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setMessage_, + value?.ref.pointer ?? ffi.nullptr, + ); + } +} + +/// NiTestsNumberWrapper +extension type NiTestsNumberWrapper._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject, objc.NSCopying { + /// Constructs a [NiTestsNumberWrapper] that points to the same underlying object as [other]. + NiTestsNumberWrapper.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NiTestsNumberWrapper] that wraps the given raw object pointer. + NiTestsNumberWrapper.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NiTestsNumberWrapper]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NiTestsNumberWrapper, + ); + + /// alloc + static NiTestsNumberWrapper alloc() { + final $ret = _objc_msgSend_151sglz(_class_NiTestsNumberWrapper, _sel_alloc); + return NiTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NiTestsNumberWrapper allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NiTestsNumberWrapper, + _sel_allocWithZone_, + zone, + ); + return NiTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// new + static NiTestsNumberWrapper new$() { + final $ret = _objc_msgSend_151sglz(_class_NiTestsNumberWrapper, _sel_new); + return NiTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NiTestsNumberWrapper constructed with the default `new` method. + NiTestsNumberWrapper() : this.as(new$().object$); +} + +extension NiTestsNumberWrapper$Methods on NiTestsNumberWrapper { + /// copyWithZone: + objc.ObjCObject copyWithZone$1(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + object$.ref.pointer, + _sel_copyWithZone_, + zone, + ); + return objc.ObjCObject($ret, retain: false, release: true); + } + + /// hash + int get hash$1 { + return _objc_msgSend_xw2lbc(object$.ref.pointer, _sel_hash); + } + + /// init + NiTestsNumberWrapper init() { + objc.checkOsVersionInternal( + 'NiTestsNumberWrapper.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NiTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// initWithNumber:type: + NiTestsNumberWrapper initWithNumber( + objc.NSNumber number, { + required int type, + }) { + final $ret = _objc_msgSend_9slupp( + object$.ref.retainAndReturnPointer(), + _sel_initWithNumber_type_, + number.ref.pointer, + type, + ); + return NiTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// isEqual: + bool isEqual(objc.ObjCObject? object) { + return _objc_msgSend_19nvye5( + object$.ref.pointer, + _sel_isEqual_, + object?.ref.pointer ?? ffi.nullptr, + ); + } + + /// number + objc.NSNumber get number { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_number); + return objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// setNumber: + set number(objc.NSNumber value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setNumber_, + value.ref.pointer, + ); + } + + /// setType: + set type(int value) { + _objc_msgSend_4sp4xj(object$.ref.pointer, _sel_setType_, value); + } + + /// type + int get type { + return _objc_msgSend_1hz7y9r(object$.ref.pointer, _sel_type); + } +} + +/// NiTestsPigeonInternalNull +extension type NiTestsPigeonInternalNull._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NiTestsPigeonInternalNull] that points to the same underlying object as [other]. + NiTestsPigeonInternalNull.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NiTestsPigeonInternalNull] that wraps the given raw object pointer. + NiTestsPigeonInternalNull.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NiTestsPigeonInternalNull]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NiTestsPigeonInternalNull, + ); + + /// alloc + static NiTestsPigeonInternalNull alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NiTestsPigeonInternalNull, + _sel_alloc, + ); + return NiTestsPigeonInternalNull.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NiTestsPigeonInternalNull allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NiTestsPigeonInternalNull, + _sel_allocWithZone_, + zone, + ); + return NiTestsPigeonInternalNull.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NiTestsPigeonInternalNull new$() { + final $ret = _objc_msgSend_151sglz( + _class_NiTestsPigeonInternalNull, + _sel_new, + ); + return NiTestsPigeonInternalNull.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// Returns a new instance of NiTestsPigeonInternalNull constructed with the default `new` method. + NiTestsPigeonInternalNull() : this.as(new$().object$); +} + +extension NiTestsPigeonInternalNull$Methods on NiTestsPigeonInternalNull { + /// init + NiTestsPigeonInternalNull init() { + objc.checkOsVersionInternal( + 'NiTestsPigeonInternalNull.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NiTestsPigeonInternalNull.fromPointer( + $ret, + retain: false, + release: true, + ); + } +} + +/// NiTestsPigeonTypedData +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NiTestsPigeonTypedData._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NiTestsPigeonTypedData] that points to the same underlying object as [other]. + NiTestsPigeonTypedData.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NiTestsPigeonTypedData', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NiTestsPigeonTypedData] that wraps the given raw object pointer. + NiTestsPigeonTypedData.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NiTestsPigeonTypedData', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NiTestsPigeonTypedData]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NiTestsPigeonTypedData, + ); + + /// alloc + static NiTestsPigeonTypedData alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NiTestsPigeonTypedData, + _sel_alloc, + ); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NiTestsPigeonTypedData allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NiTestsPigeonTypedData, + _sel_allocWithZone_, + zone, + ); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NiTestsPigeonTypedData new$() { + final $ret = _objc_msgSend_151sglz(_class_NiTestsPigeonTypedData, _sel_new); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// Returns a new instance of NiTestsPigeonTypedData constructed with the default `new` method. + NiTestsPigeonTypedData() : this.as(new$().object$); +} + +extension NiTestsPigeonTypedData$Methods on NiTestsPigeonTypedData { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.NSData get data { + objc.checkOsVersionInternal( + 'NiTestsPigeonTypedData.data', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_data); + return objc.NSData.fromPointer($ret, retain: true, release: true); + } + + /// init + NiTestsPigeonTypedData init() { + objc.checkOsVersionInternal( + 'NiTestsPigeonTypedData.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + object$.ref.retainAndReturnPointer(), + _sel_init, + ); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// initWithData:type: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NiTestsPigeonTypedData initWithData(objc.NSData data, {required int type}) { + objc.checkOsVersionInternal( + 'NiTestsPigeonTypedData.initWithData:type:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_9slupp( + object$.ref.retainAndReturnPointer(), + _sel_initWithData_type_, + data.ref.pointer, + type, + ); + return NiTestsPigeonTypedData.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + int get type { + objc.checkOsVersionInternal( + 'NiTestsPigeonTypedData.type', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + return _objc_msgSend_1hz7y9r(object$.ref.pointer, _sel_type); + } +} + +/// Construction methods for `objc.ObjCBlock, NIAllNullableTypesBridge?, NiTestsError)>`. +abstract final class ObjCBlock_NIAllNullableTypesBridge_ffiVoid_NIAllNullableTypesBridge_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + > + fromFunction( + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NIAllNullableTypesBridge?, NiTestsError)>`. +extension ObjCBlock_NIAllNullableTypesBridge_ffiVoid_NIAllNullableTypesBridge_NiTestsError$CallExtension + on + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + ) + > { + NIAllNullableTypesBridge? call( + ffi.Pointer arg0, + NIAllNullableTypesBridge? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSNumber?, objc.NSNumber?, objc.NSString?, NiTestsError)>`. +abstract final class ObjCBlock_NIAllNullableTypesBridge_ffiVoid_NSNumber_NSNumber_NSString_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > + fromFunction( + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer( + arg1, + retain: true, + release: true, + ), + arg2.address == 0 + ? null + : objc.NSNumber.fromPointer( + arg2, + retain: true, + release: true, + ), + arg3.address == 0 + ? null + : objc.NSString.fromPointer( + arg3, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg4, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3, arg4); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3, arg4); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSNumber?, objc.NSNumber?, objc.NSString?, NiTestsError)>`. +extension ObjCBlock_NIAllNullableTypesBridge_ffiVoid_NSNumber_NSNumber_NSString_NiTestsError$CallExtension + on + objc.ObjCBlock< + NIAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > { + NIAllNullableTypesBridge? call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NiTestsError arg4, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr, + arg3?.ref.pointer ?? ffi.nullptr, + arg4.ref.pointer, + ) + .address == + 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr, + arg3?.ref.pointer ?? ffi.nullptr, + arg4.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, NIAllNullableTypesWithoutRecursionBridge?, NiTestsError)>`. +abstract final class ObjCBlock_NIAllNullableTypesWithoutRecursionBridge_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + > + fromFunction( + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NIAllNullableTypesWithoutRecursionBridge?, NiTestsError)>`. +extension ObjCBlock_NIAllNullableTypesWithoutRecursionBridge_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError$CallExtension + on + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + ) + > { + NIAllNullableTypesWithoutRecursionBridge? call( + ffi.Pointer arg0, + NIAllNullableTypesWithoutRecursionBridge? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSNumber?, objc.NSNumber?, objc.NSString?, NiTestsError)>`. +abstract final class ObjCBlock_NIAllNullableTypesWithoutRecursionBridge_ffiVoid_NSNumber_NSNumber_NSString_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > + fromFunction( + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer( + arg1, + retain: true, + release: true, + ), + arg2.address == 0 + ? null + : objc.NSNumber.fromPointer( + arg2, + retain: true, + release: true, + ), + arg3.address == 0 + ? null + : objc.NSString.fromPointer( + arg3, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg4, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3, arg4); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3, arg4); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSNumber?, objc.NSNumber?, objc.NSString?, NiTestsError)>`. +extension ObjCBlock_NIAllNullableTypesWithoutRecursionBridge_ffiVoid_NSNumber_NSNumber_NSString_NiTestsError$CallExtension + on + objc.ObjCBlock< + NIAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NiTestsError, + ) + > { + NIAllNullableTypesWithoutRecursionBridge? call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NiTestsError arg4, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr, + arg3?.ref.pointer ?? ffi.nullptr, + arg4.ref.pointer, + ) + .address == + 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr, + arg3?.ref.pointer ?? ffi.nullptr, + arg4.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, NIAllTypesBridge?, NiTestsError)>`. +abstract final class ObjCBlock_NIAllTypesBridge_ffiVoid_NIAllTypesBridge_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + > + fromFunction( + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NIAllTypesBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NIAllTypesBridge?, NiTestsError)>`. +extension ObjCBlock_NIAllTypesBridge_ffiVoid_NIAllTypesBridge_NiTestsError$CallExtension + on + objc.ObjCBlock< + NIAllTypesBridge? Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + ) + > { + NIAllTypesBridge? call( + ffi.Pointer arg0, + NIAllTypesBridge? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : NIAllTypesBridge.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSArray?, NiTestsError)>`. +abstract final class ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NiTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSArray? Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NiTestsError) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + objc.NSArray? Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NiTestsError) + > + fromFunction( + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NiTestsError) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSArray? Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : objc.NSArray.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSArray?, NiTestsError)>`. +extension ObjCBlock_NSArray_ffiVoid_NSArray_NiTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSArray? Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + ) + > { + objc.NSArray? call( + ffi.Pointer arg0, + objc.NSArray? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : objc.NSArray.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSDictionary?, NiTestsError)>`. +abstract final class ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + > + fromFunction( + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : objc.NSDictionary.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSDictionary?, NiTestsError)>`. +extension ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NiTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + ) + > { + objc.NSDictionary? call( + ffi.Pointer arg0, + objc.NSDictionary? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : objc.NSDictionary.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSNumber?, NiTestsError)>`. +abstract final class ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NiTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSNumber? Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NiTestsError) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + objc.NSNumber? Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NiTestsError) + > + fromFunction( + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NiTestsError) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSNumber? Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSNumber?, NiTestsError)>`. +extension ObjCBlock_NSNumber_ffiVoid_NSNumber_NiTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSNumber? Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + ) + > { + objc.NSNumber? call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : objc.NSNumber.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, NiTestsError)>`. +abstract final class ObjCBlock_NSObject_ffiVoid_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + > + fromFunction( + objc.NSObject? Function(ffi.Pointer, NiTestsError) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + >( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + NiTestsError.fromPointer(arg1, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NiTestsError)>`. +extension ObjCBlock_NSObject_ffiVoid_NiTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSObject? Function(ffi.Pointer, NiTestsError) + > { + objc.NSObject? call(ffi.Pointer arg0, NiTestsError arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1.ref.pointer) + .address == + 0 + ? null + : objc.NSObject.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1.ref.pointer), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSString?, NiTestsError)>`. +abstract final class ObjCBlock_NSString_ffiVoid_NSString_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NiTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSString? Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NiTestsError) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + objc.NSString? Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NiTestsError) + > + fromFunction( + objc.NSString? Function(ffi.Pointer, objc.NSString?, NiTestsError) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSString? Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : objc.NSString.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSString?, NiTestsError)>`. +extension ObjCBlock_NSString_ffiVoid_NSString_NiTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSString? Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + ) + > { + objc.NSString? call( + ffi.Pointer arg0, + objc.NSString? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : objc.NSString.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock, NiTestsPigeonTypedData?, NiTestsError)>`. +abstract final class ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + > + fromFunction( + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + )?.ref.retainAndAutorelease() ?? + ffi.nullptr, + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + static ffi.Pointer _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NiTestsPigeonTypedData?, NiTestsError)>`. +extension ObjCBlock_NiTestsPigeonTypedData_ffiVoid_NiTestsPigeonTypedData_NiTestsError$CallExtension + on + objc.ObjCBlock< + NiTestsPigeonTypedData? Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + ) + > { + NiTestsPigeonTypedData? call( + ffi.Pointer arg0, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ) + .address == + 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + ), + retain: true, + release: true, + ); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function() fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock(_closureCallable, () => fn(), keepIsolateAlive), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function() fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + () => fn(), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_1pl9qdv(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function() fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + () => fn(), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + () => fn(), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_1pl9qdv( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline(ffi.Pointer block) { + (objc.getBlockClosure(block) as void Function())(); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable)> + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function(ffi.Pointer) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ) { + try { + (objc.getBlockClosure(block) as void Function())(); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline(ffi.Pointer block) => block + .ref + .target + .cast>() + .asFunction()(); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline(ffi.Pointer block) => + (objc.getBlockClosure(block) as void Function())(); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid$CallExtension + on objc.ObjCBlock { + void call() => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block) + > + >() + .asFunction)>()( + ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NIAllNullableTypesBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock + fromFunction( + void Function(NIAllNullableTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg0, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(NIAllNullableTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(NIAllNullableTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NIAllNullableTypesBridge$CallExtension + on objc.ObjCBlock { + void call(NIAllNullableTypesBridge? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + fromFunction( + void Function(NIAllNullableTypesWithoutRecursionBridge?) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + listener( + void Function(NIAllNullableTypesWithoutRecursionBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > + blocking( + void Function(NIAllNullableTypesWithoutRecursionBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + > { + void call(NIAllNullableTypesWithoutRecursionBridge? arg0) => ref + .pointer + .ref + .invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NIAllTypesBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(NIAllTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg0, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(NIAllTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(NIAllTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NIAllTypesBridge$CallExtension + on objc.ObjCBlock { + void call(NIAllTypesBridge? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSArray { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSArray.fromPointer(arg0, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(objc.NSArray?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSArray.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(objc.NSArray?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSArray.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSArray.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSArray$CallExtension + on objc.ObjCBlock { + void call(objc.NSArray? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSDictionary { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(objc.NSDictionary?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg0, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(objc.NSDictionary?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(objc.NSDictionary?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSDictionary$CallExtension + on objc.ObjCBlock { + void call(objc.NSDictionary? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSNumber { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(objc.NSNumber?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSNumber.fromPointer(arg0, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(objc.NSNumber?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSNumber.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(objc.NSNumber?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSNumber.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSNumber.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSNumber$CallExtension + on objc.ObjCBlock { + void call(objc.NSNumber? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(objc.NSObject?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSObject.fromPointer(arg0, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(objc.NSObject?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSObject.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(objc.NSObject?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSObject.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSObject.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSObject$CallExtension + on objc.ObjCBlock { + void call(objc.NSObject? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(objc.NSString?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSString.fromPointer(arg0, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(objc.NSString?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSString.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(objc.NSString?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSString.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : objc.NSString.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSString$CallExtension + on objc.ObjCBlock { + void call(objc.NSString? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NiTestsPigeonTypedData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock + fromFunction( + void Function(NiTestsPigeonTypedData?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg0, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(NiTestsPigeonTypedData?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(NiTestsPigeonTypedData?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_xtuoz7( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ) { + try { + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as void Function(ffi.Pointer))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NiTestsPigeonTypedData$CallExtension + on objc.ObjCBlock { + void call(NiTestsPigeonTypedData? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +/// Construction methods for `objc.ObjCBlock, NIAllNullableTypesBridge?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesBridge_NiTestsError_ffiVoidNIAllNullableTypesBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesBridge.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NIAllNullableTypesBridge?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesBridge_NiTestsError_ffiVoidNIAllNullableTypesBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NIAllNullableTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, NIAllNullableTypesWithoutRecursionBridge?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError_ffiVoidNIAllNullableTypesWithoutRecursionBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + > + listener( + void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + > + blocking( + void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllNullableTypesWithoutRecursionBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NIAllNullableTypesWithoutRecursionBridge?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NIAllNullableTypesWithoutRecursionBridge_NiTestsError_ffiVoidNIAllNullableTypesWithoutRecursionBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllNullableTypesWithoutRecursionBridge?, + NiTestsError, + objc.ObjCBlock< + ffi.Void Function(NIAllNullableTypesWithoutRecursionBridge?) + >, + ) + > { + void call( + ffi.Pointer arg0, + NIAllNullableTypesWithoutRecursionBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock + arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, NIAllTypesBridge?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NIAllTypesBridge_NiTestsError_ffiVoidNIAllTypesBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllTypesBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NIAllTypesBridge.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NIAllTypesBridge.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NIAllTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NIAllTypesBridge?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NIAllTypesBridge_NiTestsError_ffiVoidNIAllTypesBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NIAllTypesBridge?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NIAllTypesBridge? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSArray?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSArray.fromPointer(arg1, retain: true, release: true), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSArray.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSArray.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSArray.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSArray.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSArray.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSArray.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSArray.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSArray?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSArray_NiTestsError_ffiVoidNSArray$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSArray? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSDictionary?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSDictionary.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSDictionary.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSDictionary.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSDictionary.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSDictionary.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSDictionary.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSDictionary?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NiTestsError_ffiVoidNSDictionary$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSDictionary? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSNumber?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer(arg1, retain: true, release: true), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSNumber.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSNumber.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSNumber.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSNumber.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSNumber.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSNumber?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSNumber_NiTestsError_ffiVoidNSNumber$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSObject?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSObject.fromPointer(arg1, retain: true, release: true), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSObject.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSObject.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSObject.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSObject?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSObject_NiTestsError_ffiVoiddispatchdatat$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSObject? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, objc.NSString?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSString.fromPointer(arg1, retain: true, release: true), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSString.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSString.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSString.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSString.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSString.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : objc.NSString.fromPointer(arg1, retain: false, release: true), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSString.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, objc.NSString?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSString_NiTestsError_ffiVoidNSString$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSString? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +/// Construction methods for `objc.ObjCBlock, NiTestsError)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NiTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, NiTestsError)> + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock, NiTestsError)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NiTestsError)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + > + ptr, + ) => objc.ObjCBlock, NiTestsError)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock, NiTestsError)> + fromFunction( + void Function(ffi.Pointer, NiTestsError) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock, NiTestsError)>( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NiTestsError.fromPointer(arg1, retain: true, release: true)), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock, NiTestsError)> + listener( + void Function(ffi.Pointer, NiTestsError) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_18v1jvf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NiTestsError) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock, NiTestsError)> + blocking( + void Function(ffi.Pointer, NiTestsError) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_18v1jvf( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NiTestsError) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NiTestsError)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NiTestsError$CallExtension + on objc.ObjCBlock, NiTestsError)> { + void call(ffi.Pointer arg0, NiTestsError arg1) => ref + .pointer + .ref + .invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1.ref.pointer); +} + +/// Construction methods for `objc.ObjCBlock, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: true, release: true), + ObjCBlock_ffiVoid.fromPointer(arg2, retain: true, release: true), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_jk1ljc(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_jk1ljc( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoid$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); +} + +/// Construction methods for `objc.ObjCBlock, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoiddispatchdatat { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: true, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg2, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg2, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_jk1ljc(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg2, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NiTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer( + arg2, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_jk1ljc( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NiTestsError_ffiVoiddispatchdatat$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NiTestsError arg1, + objc.ObjCBlock arg2, + ) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); +} + +/// Construction methods for `objc.ObjCBlock, NiTestsPigeonTypedData?, NiTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg1, + retain: true, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NiTestsPigeonTypedData.fromPointer( + arg3, + retain: true, + release: true, + ), + ), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NiTestsPigeonTypedData.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NiTestsPigeonTypedData.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NiTestsPigeonTypedData.fromPointer( + arg1, + retain: false, + release: true, + ), + NiTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NiTestsPigeonTypedData.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _umaz4x_wrapBlockingBlock_bklti2( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NiTestsPigeonTypedData?, NiTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NiTestsPigeonTypedData_NiTestsError_ffiVoidNiTestsPigeonTypedData$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NiTestsPigeonTypedData?, + NiTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NiTestsPigeonTypedData? arg1, + NiTestsError arg2, + objc.ObjCBlock arg3, + ) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()( + ref.pointer, + arg0, + arg1?.ref.pointer ?? ffi.nullptr, + arg2.ref.pointer, + arg3.ref.pointer, + ); +} + +final class __SecIdentity extends ffi.Opaque {} + +final class __SecTrust extends ffi.Opaque {} + +late final _class_NIAllClassesWrapperBridge = objc.getClass( + "test_plugin.NIAllClassesWrapperBridge", +); +late final _class_NIAllNullableTypesBridge = objc.getClass( + "test_plugin.NIAllNullableTypesBridge", +); +late final _class_NIAllNullableTypesWithoutRecursionBridge = objc.getClass( + "test_plugin.NIAllNullableTypesWithoutRecursionBridge", +); +late final _class_NIAllTypesBridge = objc.getClass( + "test_plugin.NIAllTypesBridge", +); +late final _class_NIFlutterIntegrationCoreApiRegistrar = objc.getClass( + "test_plugin.NIFlutterIntegrationCoreApiRegistrar", +); +late final _class_NIHostIntegrationCoreApiSetup = objc.getClass( + "test_plugin.NIHostIntegrationCoreApiSetup", +); +late final _class_NIUnusedClassBridge = objc.getClass( + "test_plugin.NIUnusedClassBridge", +); +late final _class_NSURLCredential = objc.getClass( + "test_plugin.NSURLCredential", +); +late final _class_NiTestsError = objc.getClass("test_plugin.NiTestsError"); +late final _class_NiTestsNumberWrapper = objc.getClass( + "test_plugin.NiTestsNumberWrapper", +); +late final _class_NiTestsPigeonInternalNull = objc.getClass( + "test_plugin.NiTestsPigeonInternalNull", +); +late final _class_NiTestsPigeonTypedData = objc.getClass( + "test_plugin.NiTestsPigeonTypedData", +); +final _objc_msgSend_11spmsz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1387m63 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_151sglz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_15qeuct = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_15w00rc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_17gvxvj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_17ns785 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_18qun1e = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_19nvye5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1bf2hie = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1cwp428 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1hm1urt = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ht8su5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1hz7y9r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1j962g9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1k0qzru = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1oby3xk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1otznu6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ozwf6k = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1s3ecd1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecTrust>, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecTrust>, + ) + >(); +final _objc_msgSend_1s56lr9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ) + >(); +final _objc_msgSend_1sotr3r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ukqyt8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1yka6e5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_4sp4xj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_91o635 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_9slupp = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_bscj0h = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_d3bb7e = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_e3qsqz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_etw0ff = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_f15nnv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_hwm8nu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + double, + ) + >(); +final _objc_msgSend_ih63eg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_jfo4g1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.UnsignedLong, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_ladeuy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); +final _objc_msgSend_nkb3zz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_o762yo = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_pfv6jd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_pysgoz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_s92gih = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_w1rg4f = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ) + >(); +final _objc_msgSend_whwize = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Int64, + ffi.Int64, + ffi.Double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + bool, + int, + int, + double, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_xtuoz7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_xw2lbc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +late final _protocol_NIFlutterIntegrationCoreApiBridge = objc.getProtocol( + "test_plugin.NIFlutterIntegrationCoreApiBridge", +); +late final _sel_a4ByteArray = objc.registerName("a4ByteArray"); +late final _sel_a8ByteArray = objc.registerName("a8ByteArray"); +late final _sel_aBool = objc.registerName("aBool"); +late final _sel_aByteArray = objc.registerName("aByteArray"); +late final _sel_aDouble = objc.registerName("aDouble"); +late final _sel_aField = objc.registerName("aField"); +late final _sel_aFloatArray = objc.registerName("aFloatArray"); +late final _sel_aNullable4ByteArray = objc.registerName("aNullable4ByteArray"); +late final _sel_aNullable8ByteArray = objc.registerName("aNullable8ByteArray"); +late final _sel_aNullableBool = objc.registerName("aNullableBool"); +late final _sel_aNullableByteArray = objc.registerName("aNullableByteArray"); +late final _sel_aNullableDouble = objc.registerName("aNullableDouble"); +late final _sel_aNullableEnum = objc.registerName("aNullableEnum"); +late final _sel_aNullableFloatArray = objc.registerName("aNullableFloatArray"); +late final _sel_aNullableInt = objc.registerName("aNullableInt"); +late final _sel_aNullableInt64 = objc.registerName("aNullableInt64"); +late final _sel_aNullableObject = objc.registerName("aNullableObject"); +late final _sel_aNullableString = objc.registerName("aNullableString"); +late final _sel_aString = objc.registerName("aString"); +late final _sel_allNullableTypes = objc.registerName("allNullableTypes"); +late final _sel_allNullableTypesWithoutRecursion = objc.registerName( + "allNullableTypesWithoutRecursion", +); +late final _sel_allTypes = objc.registerName("allTypes"); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +late final _sel_anEnum = objc.registerName("anEnum"); +late final _sel_anInt = objc.registerName("anInt"); +late final _sel_anInt64 = objc.registerName("anInt64"); +late final _sel_anObject = objc.registerName("anObject"); +late final _sel_anotherEnum = objc.registerName("anotherEnum"); +late final _sel_anotherNullableEnum = objc.registerName("anotherNullableEnum"); +late final _sel_boolList = objc.registerName("boolList"); +late final _sel_callFlutterEchoAnotherAsyncEnumWithAnotherEnum_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAnotherAsyncEnumWithAnotherEnum:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAnotherNullableEnumWithAnotherEnum_wrappedError_ = + objc.registerName( + "callFlutterEchoAnotherNullableEnumWithAnotherEnum:wrappedError:", + ); +late final _sel_callFlutterEchoAsyncBoolWithABool_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncBoolWithABool:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncClassListWithClassList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncClassListWithClassList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncClassMapWithClassMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncClassMapWithClassMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncDoubleWithADouble_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncDoubleWithADouble:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncEnumListWithEnumList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncEnumListWithEnumList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncEnumMapWithEnumMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncEnumMapWithEnumMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncEnumWithAnEnum_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncEnumWithAnEnum:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncFloat64ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncFloat64ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncInt32ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncInt32ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncInt64ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncInt64ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncIntMapWithIntMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncIntMapWithIntMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncIntWithAnInt_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncIntWithAnInt:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncMapWithMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncMapWithMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNIAllTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNIAllTypesWithEverything:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNonNullClassListWithClassList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNonNullClassListWithClassList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNonNullEnumListWithEnumList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNonNullEnumListWithEnumList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableBoolWithABool_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableBoolWithABool:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableClassListWithClassList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableClassListWithClassList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableClassMapWithClassMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableClassMapWithClassMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableDoubleWithADouble_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableDoubleWithADouble:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableEnumListWithEnumList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableEnumListWithEnumList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableEnumMapWithEnumMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableEnumMapWithEnumMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableEnumWithAnEnum_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableEnumWithAnEnum:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableFloat64ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableFloat64ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableInt32ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableInt32ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableInt64ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableInt64ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableIntMapWithIntMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableIntMapWithIntMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableIntWithAnInt_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableIntWithAnInt:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableMapWithMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableMapWithMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableNonNullClassListWithClassList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableNonNullClassListWithClassList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableNonNullEnumListWithEnumList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableNonNullEnumListWithEnumList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableObjectWithAnObject_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableObjectWithAnObject:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableStringMapWithStringMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableStringMapWithStringMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableStringWithAString_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableStringWithAString:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableUint8ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableUint8ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncObjectWithAnObject_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncObjectWithAnObject:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncStringMapWithStringMap_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncStringMapWithStringMap:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncStringWithAString_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncStringWithAString:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncUint8ListWithList_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncUint8ListWithList:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoBoolWithABool_wrappedError_ = objc.registerName( + "callFlutterEchoBoolWithABool:wrappedError:", +); +late final _sel_callFlutterEchoClassListWithClassList_wrappedError_ = objc + .registerName("callFlutterEchoClassListWithClassList:wrappedError:"); +late final _sel_callFlutterEchoClassMapWithClassMap_wrappedError_ = objc + .registerName("callFlutterEchoClassMapWithClassMap:wrappedError:"); +late final _sel_callFlutterEchoDoubleWithADouble_wrappedError_ = objc + .registerName("callFlutterEchoDoubleWithADouble:wrappedError:"); +late final _sel_callFlutterEchoEnumListWithEnumList_wrappedError_ = objc + .registerName("callFlutterEchoEnumListWithEnumList:wrappedError:"); +late final _sel_callFlutterEchoEnumMapWithEnumMap_wrappedError_ = objc + .registerName("callFlutterEchoEnumMapWithEnumMap:wrappedError:"); +late final _sel_callFlutterEchoEnumWithAnEnum_wrappedError_ = objc.registerName( + "callFlutterEchoEnumWithAnEnum:wrappedError:", +); +late final _sel_callFlutterEchoFloat64ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoFloat64ListWithList:wrappedError:"); +late final _sel_callFlutterEchoInt32ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoInt32ListWithList:wrappedError:"); +late final _sel_callFlutterEchoInt64ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoInt64ListWithList:wrappedError:"); +late final _sel_callFlutterEchoIntMapWithIntMap_wrappedError_ = objc + .registerName("callFlutterEchoIntMapWithIntMap:wrappedError:"); +late final _sel_callFlutterEchoIntWithAnInt_wrappedError_ = objc.registerName( + "callFlutterEchoIntWithAnInt:wrappedError:", +); +late final _sel_callFlutterEchoListWithList_wrappedError_ = objc.registerName( + "callFlutterEchoListWithList:wrappedError:", +); +late final _sel_callFlutterEchoMapWithMap_wrappedError_ = objc.registerName( + "callFlutterEchoMapWithMap:wrappedError:", +); +late final _sel_callFlutterEchoNIAllNullableTypesWithEverything_wrappedError_ = + objc.registerName( + "callFlutterEchoNIAllNullableTypesWithEverything:wrappedError:", + ); +late final _sel_callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything_wrappedError_ = + objc.registerName( + "callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:", + ); +late final _sel_callFlutterEchoNIAllTypesWithEverything_wrappedError_ = objc + .registerName("callFlutterEchoNIAllTypesWithEverything:wrappedError:"); +late final _sel_callFlutterEchoNIAnotherEnumWithAnotherEnum_wrappedError_ = objc + .registerName("callFlutterEchoNIAnotherEnumWithAnotherEnum:wrappedError:"); +late final _sel_callFlutterEchoNonNullClassListWithClassList_wrappedError_ = + objc.registerName( + "callFlutterEchoNonNullClassListWithClassList:wrappedError:", + ); +late final _sel_callFlutterEchoNonNullClassMapWithClassMap_wrappedError_ = objc + .registerName("callFlutterEchoNonNullClassMapWithClassMap:wrappedError:"); +late final _sel_callFlutterEchoNonNullEnumListWithEnumList_wrappedError_ = objc + .registerName("callFlutterEchoNonNullEnumListWithEnumList:wrappedError:"); +late final _sel_callFlutterEchoNonNullEnumMapWithEnumMap_wrappedError_ = objc + .registerName("callFlutterEchoNonNullEnumMapWithEnumMap:wrappedError:"); +late final _sel_callFlutterEchoNonNullIntMapWithIntMap_wrappedError_ = objc + .registerName("callFlutterEchoNonNullIntMapWithIntMap:wrappedError:"); +late final _sel_callFlutterEchoNonNullStringMapWithStringMap_wrappedError_ = + objc.registerName( + "callFlutterEchoNonNullStringMapWithStringMap:wrappedError:", + ); +late final _sel_callFlutterEchoNullableBoolWithABool_wrappedError_ = objc + .registerName("callFlutterEchoNullableBoolWithABool:wrappedError:"); +late final _sel_callFlutterEchoNullableClassListWithClassList_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableClassListWithClassList:wrappedError:", + ); +late final _sel_callFlutterEchoNullableClassMapWithClassMap_wrappedError_ = objc + .registerName("callFlutterEchoNullableClassMapWithClassMap:wrappedError:"); +late final _sel_callFlutterEchoNullableDoubleWithADouble_wrappedError_ = objc + .registerName("callFlutterEchoNullableDoubleWithADouble:wrappedError:"); +late final _sel_callFlutterEchoNullableEnumListWithEnumList_wrappedError_ = objc + .registerName("callFlutterEchoNullableEnumListWithEnumList:wrappedError:"); +late final _sel_callFlutterEchoNullableEnumMapWithEnumMap_wrappedError_ = objc + .registerName("callFlutterEchoNullableEnumMapWithEnumMap:wrappedError:"); +late final _sel_callFlutterEchoNullableEnumWithAnEnum_wrappedError_ = objc + .registerName("callFlutterEchoNullableEnumWithAnEnum:wrappedError:"); +late final _sel_callFlutterEchoNullableFloat64ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoNullableFloat64ListWithList:wrappedError:"); +late final _sel_callFlutterEchoNullableInt32ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoNullableInt32ListWithList:wrappedError:"); +late final _sel_callFlutterEchoNullableInt64ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoNullableInt64ListWithList:wrappedError:"); +late final _sel_callFlutterEchoNullableIntMapWithIntMap_wrappedError_ = objc + .registerName("callFlutterEchoNullableIntMapWithIntMap:wrappedError:"); +late final _sel_callFlutterEchoNullableIntWithAnInt_wrappedError_ = objc + .registerName("callFlutterEchoNullableIntWithAnInt:wrappedError:"); +late final _sel_callFlutterEchoNullableListWithList_wrappedError_ = objc + .registerName("callFlutterEchoNullableListWithList:wrappedError:"); +late final _sel_callFlutterEchoNullableMapWithMap_wrappedError_ = objc + .registerName("callFlutterEchoNullableMapWithMap:wrappedError:"); +late final _sel_callFlutterEchoNullableNonNullClassListWithClassList_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableNonNullClassListWithClassList:wrappedError:", + ); +late final _sel_callFlutterEchoNullableNonNullClassMapWithClassMap_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableNonNullClassMapWithClassMap:wrappedError:", + ); +late final _sel_callFlutterEchoNullableNonNullEnumListWithEnumList_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableNonNullEnumListWithEnumList:wrappedError:", + ); +late final _sel_callFlutterEchoNullableNonNullEnumMapWithEnumMap_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableNonNullEnumMapWithEnumMap:wrappedError:", + ); +late final _sel_callFlutterEchoNullableNonNullIntMapWithIntMap_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableNonNullIntMapWithIntMap:wrappedError:", + ); +late final _sel_callFlutterEchoNullableNonNullStringMapWithStringMap_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableNonNullStringMapWithStringMap:wrappedError:", + ); +late final _sel_callFlutterEchoNullableStringMapWithStringMap_wrappedError_ = + objc.registerName( + "callFlutterEchoNullableStringMapWithStringMap:wrappedError:", + ); +late final _sel_callFlutterEchoNullableStringWithAString_wrappedError_ = objc + .registerName("callFlutterEchoNullableStringWithAString:wrappedError:"); +late final _sel_callFlutterEchoNullableUint8ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoNullableUint8ListWithList:wrappedError:"); +late final _sel_callFlutterEchoStringMapWithStringMap_wrappedError_ = objc + .registerName("callFlutterEchoStringMapWithStringMap:wrappedError:"); +late final _sel_callFlutterEchoStringWithAString_wrappedError_ = objc + .registerName("callFlutterEchoStringWithAString:wrappedError:"); +late final _sel_callFlutterEchoUint8ListWithList_wrappedError_ = objc + .registerName("callFlutterEchoUint8ListWithList:wrappedError:"); +late final _sel_callFlutterNoopAsyncWithWrappedError_completionHandler_ = objc + .registerName("callFlutterNoopAsyncWithWrappedError:completionHandler:"); +late final _sel_callFlutterNoopOnBackgroundThreadWithWrappedError_completionHandler_ = + objc.registerName( + "callFlutterNoopOnBackgroundThreadWithWrappedError:completionHandler:", + ); +late final _sel_callFlutterNoopWithWrappedError_ = objc.registerName( + "callFlutterNoopWithWrappedError:", +); +late final _sel_callFlutterSendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_wrappedError_ = + objc.registerName( + "callFlutterSendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError:", + ); +late final _sel_callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_wrappedError_ = + objc.registerName( + "callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError:", + ); +late final _sel_callFlutterThrowErrorFromVoidWithWrappedError_ = objc + .registerName("callFlutterThrowErrorFromVoidWithWrappedError:"); +late final _sel_callFlutterThrowErrorWithWrappedError_ = objc.registerName( + "callFlutterThrowErrorWithWrappedError:", +); +late final _sel_callFlutterThrowFlutterErrorAsyncWithWrappedError_completionHandler_ = + objc.registerName( + "callFlutterThrowFlutterErrorAsyncWithWrappedError:completionHandler:", + ); +late final _sel_certificates = objc.registerName("certificates"); +late final _sel_classList = objc.registerName("classList"); +late final _sel_classMap = objc.registerName("classMap"); +late final _sel_code = objc.registerName("code"); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); +late final _sel_createNestedNullableStringWithNullableString_wrappedError_ = + objc.registerName( + "createNestedNullableStringWithNullableString:wrappedError:", + ); +late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); +late final _sel_credentialWithIdentity_certificates_persistence_ = objc + .registerName("credentialWithIdentity:certificates:persistence:"); +late final _sel_credentialWithUser_password_persistence_ = objc.registerName( + "credentialWithUser:password:persistence:", +); +late final _sel_data = objc.registerName("data"); +late final _sel_defaultIsMainThreadWithWrappedError_ = objc.registerName( + "defaultIsMainThreadWithWrappedError:", +); +late final _sel_details = objc.registerName("details"); +late final _sel_doubleList = objc.registerName("doubleList"); +late final _sel_echoAllNullableTypesWithEverything_wrappedError_ = objc + .registerName("echoAllNullableTypesWithEverything:wrappedError:"); +late final _sel_echoAllNullableTypesWithoutRecursionWithEverything_wrappedError_ = + objc.registerName( + "echoAllNullableTypesWithoutRecursionWithEverything:wrappedError:", + ); +late final _sel_echoAllTypesWithEverything_wrappedError_ = objc.registerName( + "echoAllTypesWithEverything:wrappedError:", +); +late final _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ = + objc.registerName( + "echoAnotherAsyncEnumWithAnotherEnum:error:completionHandler:", + ); +late final _sel_echoAnotherAsyncEnumWithAnotherEnum_wrappedError_completionHandler_ = + objc.registerName( + "echoAnotherAsyncEnumWithAnotherEnum:wrappedError:completionHandler:", + ); +late final _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ = + objc.registerName( + "echoAnotherAsyncNullableEnumWithAnotherEnum:error:completionHandler:", + ); +late final _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_wrappedError_completionHandler_ = + objc.registerName( + "echoAnotherAsyncNullableEnumWithAnotherEnum:wrappedError:completionHandler:", + ); +late final _sel_echoAnotherEnumWithAnotherEnum_wrappedError_ = objc + .registerName("echoAnotherEnumWithAnotherEnum:wrappedError:"); +late final _sel_echoAnotherNullableEnumWithAnotherEnum_error_ = objc + .registerName("echoAnotherNullableEnumWithAnotherEnum:error:"); +late final _sel_echoAnotherNullableEnumWithAnotherEnum_wrappedError_ = objc + .registerName("echoAnotherNullableEnumWithAnotherEnum:wrappedError:"); +late final _sel_echoAsyncBoolWithABool_error_completionHandler_ = objc + .registerName("echoAsyncBoolWithABool:error:completionHandler:"); +late final _sel_echoAsyncBoolWithABool_wrappedError_completionHandler_ = objc + .registerName("echoAsyncBoolWithABool:wrappedError:completionHandler:"); +late final _sel_echoAsyncClassListWithClassList_error_completionHandler_ = objc + .registerName("echoAsyncClassListWithClassList:error:completionHandler:"); +late final _sel_echoAsyncClassListWithClassList_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncClassListWithClassList:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncClassMapWithClassMap_error_completionHandler_ = objc + .registerName("echoAsyncClassMapWithClassMap:error:completionHandler:"); +late final _sel_echoAsyncClassMapWithClassMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncClassMapWithClassMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncDoubleWithADouble_error_completionHandler_ = objc + .registerName("echoAsyncDoubleWithADouble:error:completionHandler:"); +late final _sel_echoAsyncDoubleWithADouble_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncDoubleWithADouble:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncEnumListWithEnumList_error_completionHandler_ = objc + .registerName("echoAsyncEnumListWithEnumList:error:completionHandler:"); +late final _sel_echoAsyncEnumListWithEnumList_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncEnumListWithEnumList:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_ = objc + .registerName("echoAsyncEnumMapWithEnumMap:error:completionHandler:"); +late final _sel_echoAsyncEnumMapWithEnumMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncEnumMapWithEnumMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncEnumWithAnEnum_error_completionHandler_ = objc + .registerName("echoAsyncEnumWithAnEnum:error:completionHandler:"); +late final _sel_echoAsyncEnumWithAnEnum_wrappedError_completionHandler_ = objc + .registerName("echoAsyncEnumWithAnEnum:wrappedError:completionHandler:"); +late final _sel_echoAsyncFloat64ListWithAFloat64List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncFloat64ListWithAFloat64List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncFloat64ListWithList_error_completionHandler_ = objc + .registerName("echoAsyncFloat64ListWithList:error:completionHandler:"); +late final _sel_echoAsyncInt32ListWithAInt32List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncInt32ListWithAInt32List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncInt32ListWithList_error_completionHandler_ = objc + .registerName("echoAsyncInt32ListWithList:error:completionHandler:"); +late final _sel_echoAsyncInt64ListWithAInt64List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncInt64ListWithAInt64List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncInt64ListWithList_error_completionHandler_ = objc + .registerName("echoAsyncInt64ListWithList:error:completionHandler:"); +late final _sel_echoAsyncIntMapWithIntMap_error_completionHandler_ = objc + .registerName("echoAsyncIntMapWithIntMap:error:completionHandler:"); +late final _sel_echoAsyncIntMapWithIntMap_wrappedError_completionHandler_ = objc + .registerName("echoAsyncIntMapWithIntMap:wrappedError:completionHandler:"); +late final _sel_echoAsyncIntWithAnInt_error_completionHandler_ = objc + .registerName("echoAsyncIntWithAnInt:error:completionHandler:"); +late final _sel_echoAsyncIntWithAnInt_wrappedError_completionHandler_ = objc + .registerName("echoAsyncIntWithAnInt:wrappedError:completionHandler:"); +late final _sel_echoAsyncListWithList_error_completionHandler_ = objc + .registerName("echoAsyncListWithList:error:completionHandler:"); +late final _sel_echoAsyncListWithList_wrappedError_completionHandler_ = objc + .registerName("echoAsyncListWithList:wrappedError:completionHandler:"); +late final _sel_echoAsyncMapWithMap_error_completionHandler_ = objc + .registerName("echoAsyncMapWithMap:error:completionHandler:"); +late final _sel_echoAsyncMapWithMap_wrappedError_completionHandler_ = objc + .registerName("echoAsyncMapWithMap:wrappedError:completionHandler:"); +late final _sel_echoAsyncNIAllTypesWithEverything_error_completionHandler_ = + objc.registerName( + "echoAsyncNIAllTypesWithEverything:error:completionHandler:", + ); +late final _sel_echoAsyncNIAllTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNIAllTypesWithEverything:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_ = + objc.registerName( + "echoAsyncNonNullClassListWithClassList:error:completionHandler:", + ); +late final _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ = + objc.registerName( + "echoAsyncNonNullEnumListWithEnumList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableBoolWithABool_error_completionHandler_ = objc + .registerName("echoAsyncNullableBoolWithABool:error:completionHandler:"); +late final _sel_echoAsyncNullableBoolWithABool_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableBoolWithABool:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableClassListWithClassList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableClassListWithClassList_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableClassListWithClassList:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableClassMapWithClassMap:error:completionHandler:", + ); +late final _sel_echoAsyncNullableClassMapWithClassMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableClassMapWithClassMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableDoubleWithADouble:error:completionHandler:", + ); +late final _sel_echoAsyncNullableDoubleWithADouble_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableDoubleWithADouble:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableEnumListWithEnumList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableEnumListWithEnumList_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableEnumListWithEnumList:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableEnumMapWithEnumMap:error:completionHandler:", + ); +late final _sel_echoAsyncNullableEnumMapWithEnumMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableEnumMapWithEnumMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_ = objc + .registerName("echoAsyncNullableEnumWithAnEnum:error:completionHandler:"); +late final _sel_echoAsyncNullableEnumWithAnEnum_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableEnumWithAnEnum:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableFloat64ListWithAFloat64List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableFloat64ListWithAFloat64List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableFloat64ListWithList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableInt32ListWithAInt32List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableInt32ListWithAInt32List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableInt32ListWithList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableInt64ListWithAInt64List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableInt64ListWithAInt64List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableInt64ListWithList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableIntMapWithIntMap:error:completionHandler:", + ); +late final _sel_echoAsyncNullableIntMapWithIntMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableIntMapWithIntMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_ = objc + .registerName("echoAsyncNullableIntWithAnInt:error:completionHandler:"); +late final _sel_echoAsyncNullableIntWithAnInt_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableIntWithAnInt:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableListWithList_error_completionHandler_ = objc + .registerName("echoAsyncNullableListWithList:error:completionHandler:"); +late final _sel_echoAsyncNullableListWithList_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableListWithList:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableMapWithMap_error_completionHandler_ = objc + .registerName("echoAsyncNullableMapWithMap:error:completionHandler:"); +late final _sel_echoAsyncNullableMapWithMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableMapWithMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableNIAllNullableTypesWithEverything_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableNIAllNullableTypesWithEverything:error:completionHandler:", + ); +late final _sel_echoAsyncNullableNIAllNullableTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableNIAllNullableTypesWithEverything:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:error:completionHandler:", + ); +late final _sel_echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableNonNullClassListWithClassList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableNonNullEnumListWithEnumList:error:completionHandler:", + ); +late final _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableObjectWithAnObject:error:completionHandler:", + ); +late final _sel_echoAsyncNullableObjectWithAnObject_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableObjectWithAnObject:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableStringMapWithStringMap:error:completionHandler:", + ); +late final _sel_echoAsyncNullableStringMapWithStringMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableStringMapWithStringMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableStringWithAString_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableStringWithAString:error:completionHandler:", + ); +late final _sel_echoAsyncNullableStringWithAString_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableStringWithAString:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableUint8ListWithAUint8List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableUint8ListWithAUint8List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableUint8ListWithList:error:completionHandler:", + ); +late final _sel_echoAsyncObjectWithAnObject_error_completionHandler_ = objc + .registerName("echoAsyncObjectWithAnObject:error:completionHandler:"); +late final _sel_echoAsyncObjectWithAnObject_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncObjectWithAnObject:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncStringMapWithStringMap_error_completionHandler_ = objc + .registerName("echoAsyncStringMapWithStringMap:error:completionHandler:"); +late final _sel_echoAsyncStringMapWithStringMap_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncStringMapWithStringMap:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncStringWithAString_error_completionHandler_ = objc + .registerName("echoAsyncStringWithAString:error:completionHandler:"); +late final _sel_echoAsyncStringWithAString_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncStringWithAString:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncUint8ListWithAUint8List_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncUint8ListWithAUint8List:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncUint8ListWithList_error_completionHandler_ = objc + .registerName("echoAsyncUint8ListWithList:error:completionHandler:"); +late final _sel_echoBoolListWithBoolList_wrappedError_ = objc.registerName( + "echoBoolListWithBoolList:wrappedError:", +); +late final _sel_echoBoolWithABool_error_ = objc.registerName( + "echoBoolWithABool:error:", +); +late final _sel_echoBoolWithABool_wrappedError_ = objc.registerName( + "echoBoolWithABool:wrappedError:", +); +late final _sel_echoClassListWithClassList_error_ = objc.registerName( + "echoClassListWithClassList:error:", +); +late final _sel_echoClassListWithClassList_wrappedError_ = objc.registerName( + "echoClassListWithClassList:wrappedError:", +); +late final _sel_echoClassMapWithClassMap_error_ = objc.registerName( + "echoClassMapWithClassMap:error:", +); +late final _sel_echoClassMapWithClassMap_wrappedError_ = objc.registerName( + "echoClassMapWithClassMap:wrappedError:", +); +late final _sel_echoClassWrapperWithWrapper_wrappedError_ = objc.registerName( + "echoClassWrapperWithWrapper:wrappedError:", +); +late final _sel_echoDoubleListWithDoubleList_wrappedError_ = objc.registerName( + "echoDoubleListWithDoubleList:wrappedError:", +); +late final _sel_echoDoubleWithADouble_error_ = objc.registerName( + "echoDoubleWithADouble:error:", +); +late final _sel_echoDoubleWithADouble_wrappedError_ = objc.registerName( + "echoDoubleWithADouble:wrappedError:", +); +late final _sel_echoEnumListWithEnumList_error_ = objc.registerName( + "echoEnumListWithEnumList:error:", +); +late final _sel_echoEnumListWithEnumList_wrappedError_ = objc.registerName( + "echoEnumListWithEnumList:wrappedError:", +); +late final _sel_echoEnumMapWithEnumMap_error_ = objc.registerName( + "echoEnumMapWithEnumMap:error:", +); +late final _sel_echoEnumMapWithEnumMap_wrappedError_ = objc.registerName( + "echoEnumMapWithEnumMap:wrappedError:", +); +late final _sel_echoEnumWithAnEnum_error_ = objc.registerName( + "echoEnumWithAnEnum:error:", +); +late final _sel_echoEnumWithAnEnum_wrappedError_ = objc.registerName( + "echoEnumWithAnEnum:wrappedError:", +); +late final _sel_echoFloat64ListWithAFloat64List_wrappedError_ = objc + .registerName("echoFloat64ListWithAFloat64List:wrappedError:"); +late final _sel_echoFloat64ListWithList_error_ = objc.registerName( + "echoFloat64ListWithList:error:", +); +late final _sel_echoInt32ListWithAInt32List_wrappedError_ = objc.registerName( + "echoInt32ListWithAInt32List:wrappedError:", +); +late final _sel_echoInt32ListWithList_error_ = objc.registerName( + "echoInt32ListWithList:error:", +); +late final _sel_echoInt64ListWithAInt64List_wrappedError_ = objc.registerName( + "echoInt64ListWithAInt64List:wrappedError:", +); +late final _sel_echoInt64ListWithList_error_ = objc.registerName( + "echoInt64ListWithList:error:", +); +late final _sel_echoIntListWithIntList_wrappedError_ = objc.registerName( + "echoIntListWithIntList:wrappedError:", +); +late final _sel_echoIntMapWithIntMap_error_ = objc.registerName( + "echoIntMapWithIntMap:error:", +); +late final _sel_echoIntMapWithIntMap_wrappedError_ = objc.registerName( + "echoIntMapWithIntMap:wrappedError:", +); +late final _sel_echoIntWithAnInt_error_ = objc.registerName( + "echoIntWithAnInt:error:", +); +late final _sel_echoIntWithAnInt_wrappedError_ = objc.registerName( + "echoIntWithAnInt:wrappedError:", +); +late final _sel_echoListWithList_error_ = objc.registerName( + "echoListWithList:error:", +); +late final _sel_echoListWithList_wrappedError_ = objc.registerName( + "echoListWithList:wrappedError:", +); +late final _sel_echoMapWithMap_error_ = objc.registerName( + "echoMapWithMap:error:", +); +late final _sel_echoMapWithMap_wrappedError_ = objc.registerName( + "echoMapWithMap:wrappedError:", +); +late final _sel_echoNIAllNullableTypesWithEverything_error_ = objc.registerName( + "echoNIAllNullableTypesWithEverything:error:", +); +late final _sel_echoNIAllNullableTypesWithoutRecursionWithEverything_error_ = + objc.registerName( + "echoNIAllNullableTypesWithoutRecursionWithEverything:error:", + ); +late final _sel_echoNIAllTypesWithEverything_error_ = objc.registerName( + "echoNIAllTypesWithEverything:error:", +); +late final _sel_echoNIAnotherEnumWithAnotherEnum_error_ = objc.registerName( + "echoNIAnotherEnumWithAnotherEnum:error:", +); +late final _sel_echoNamedDefaultStringWithAString_wrappedError_ = objc + .registerName("echoNamedDefaultStringWithAString:wrappedError:"); +late final _sel_echoNamedNullableStringWithANullableString_wrappedError_ = objc + .registerName("echoNamedNullableStringWithANullableString:wrappedError:"); +late final _sel_echoNonNullClassListWithClassList_error_ = objc.registerName( + "echoNonNullClassListWithClassList:error:", +); +late final _sel_echoNonNullClassListWithClassList_wrappedError_ = objc + .registerName("echoNonNullClassListWithClassList:wrappedError:"); +late final _sel_echoNonNullClassMapWithClassMap_error_ = objc.registerName( + "echoNonNullClassMapWithClassMap:error:", +); +late final _sel_echoNonNullClassMapWithClassMap_wrappedError_ = objc + .registerName("echoNonNullClassMapWithClassMap:wrappedError:"); +late final _sel_echoNonNullEnumListWithEnumList_error_ = objc.registerName( + "echoNonNullEnumListWithEnumList:error:", +); +late final _sel_echoNonNullEnumListWithEnumList_wrappedError_ = objc + .registerName("echoNonNullEnumListWithEnumList:wrappedError:"); +late final _sel_echoNonNullEnumMapWithEnumMap_error_ = objc.registerName( + "echoNonNullEnumMapWithEnumMap:error:", +); +late final _sel_echoNonNullEnumMapWithEnumMap_wrappedError_ = objc.registerName( + "echoNonNullEnumMapWithEnumMap:wrappedError:", +); +late final _sel_echoNonNullIntMapWithIntMap_error_ = objc.registerName( + "echoNonNullIntMapWithIntMap:error:", +); +late final _sel_echoNonNullIntMapWithIntMap_wrappedError_ = objc.registerName( + "echoNonNullIntMapWithIntMap:wrappedError:", +); +late final _sel_echoNonNullStringMapWithStringMap_error_ = objc.registerName( + "echoNonNullStringMapWithStringMap:error:", +); +late final _sel_echoNonNullStringMapWithStringMap_wrappedError_ = objc + .registerName("echoNonNullStringMapWithStringMap:wrappedError:"); +late final _sel_echoNullableBoolWithABool_error_ = objc.registerName( + "echoNullableBoolWithABool:error:", +); +late final _sel_echoNullableBoolWithANullableBool_wrappedError_ = objc + .registerName("echoNullableBoolWithANullableBool:wrappedError:"); +late final _sel_echoNullableClassListWithClassList_error_ = objc.registerName( + "echoNullableClassListWithClassList:error:", +); +late final _sel_echoNullableClassListWithClassList_wrappedError_ = objc + .registerName("echoNullableClassListWithClassList:wrappedError:"); +late final _sel_echoNullableClassMapWithClassMap_error_ = objc.registerName( + "echoNullableClassMapWithClassMap:error:", +); +late final _sel_echoNullableClassMapWithClassMap_wrappedError_ = objc + .registerName("echoNullableClassMapWithClassMap:wrappedError:"); +late final _sel_echoNullableDoubleWithADouble_error_ = objc.registerName( + "echoNullableDoubleWithADouble:error:", +); +late final _sel_echoNullableDoubleWithANullableDouble_wrappedError_ = objc + .registerName("echoNullableDoubleWithANullableDouble:wrappedError:"); +late final _sel_echoNullableEnumListWithEnumList_error_ = objc.registerName( + "echoNullableEnumListWithEnumList:error:", +); +late final _sel_echoNullableEnumListWithEnumList_wrappedError_ = objc + .registerName("echoNullableEnumListWithEnumList:wrappedError:"); +late final _sel_echoNullableEnumMapWithEnumMap_error_ = objc.registerName( + "echoNullableEnumMapWithEnumMap:error:", +); +late final _sel_echoNullableEnumMapWithEnumMap_wrappedError_ = objc + .registerName("echoNullableEnumMapWithEnumMap:wrappedError:"); +late final _sel_echoNullableEnumWithAnEnum_error_ = objc.registerName( + "echoNullableEnumWithAnEnum:error:", +); +late final _sel_echoNullableEnumWithAnEnum_wrappedError_ = objc.registerName( + "echoNullableEnumWithAnEnum:wrappedError:", +); +late final _sel_echoNullableFloat64ListWithANullableFloat64List_wrappedError_ = + objc.registerName( + "echoNullableFloat64ListWithANullableFloat64List:wrappedError:", + ); +late final _sel_echoNullableFloat64ListWithList_error_ = objc.registerName( + "echoNullableFloat64ListWithList:error:", +); +late final _sel_echoNullableInt32ListWithANullableInt32List_wrappedError_ = objc + .registerName("echoNullableInt32ListWithANullableInt32List:wrappedError:"); +late final _sel_echoNullableInt32ListWithList_error_ = objc.registerName( + "echoNullableInt32ListWithList:error:", +); +late final _sel_echoNullableInt64ListWithANullableInt64List_wrappedError_ = objc + .registerName("echoNullableInt64ListWithANullableInt64List:wrappedError:"); +late final _sel_echoNullableInt64ListWithList_error_ = objc.registerName( + "echoNullableInt64ListWithList:error:", +); +late final _sel_echoNullableIntMapWithIntMap_error_ = objc.registerName( + "echoNullableIntMapWithIntMap:error:", +); +late final _sel_echoNullableIntMapWithIntMap_wrappedError_ = objc.registerName( + "echoNullableIntMapWithIntMap:wrappedError:", +); +late final _sel_echoNullableIntWithANullableInt_wrappedError_ = objc + .registerName("echoNullableIntWithANullableInt:wrappedError:"); +late final _sel_echoNullableIntWithAnInt_error_ = objc.registerName( + "echoNullableIntWithAnInt:error:", +); +late final _sel_echoNullableListWithANullableList_wrappedError_ = objc + .registerName("echoNullableListWithANullableList:wrappedError:"); +late final _sel_echoNullableListWithList_error_ = objc.registerName( + "echoNullableListWithList:error:", +); +late final _sel_echoNullableMapWithMap_error_ = objc.registerName( + "echoNullableMapWithMap:error:", +); +late final _sel_echoNullableMapWithMap_wrappedError_ = objc.registerName( + "echoNullableMapWithMap:wrappedError:", +); +late final _sel_echoNullableNonNullClassListWithClassList_error_ = objc + .registerName("echoNullableNonNullClassListWithClassList:error:"); +late final _sel_echoNullableNonNullClassListWithClassList_wrappedError_ = objc + .registerName("echoNullableNonNullClassListWithClassList:wrappedError:"); +late final _sel_echoNullableNonNullClassMapWithClassMap_error_ = objc + .registerName("echoNullableNonNullClassMapWithClassMap:error:"); +late final _sel_echoNullableNonNullClassMapWithClassMap_wrappedError_ = objc + .registerName("echoNullableNonNullClassMapWithClassMap:wrappedError:"); +late final _sel_echoNullableNonNullEnumListWithEnumList_error_ = objc + .registerName("echoNullableNonNullEnumListWithEnumList:error:"); +late final _sel_echoNullableNonNullEnumListWithEnumList_wrappedError_ = objc + .registerName("echoNullableNonNullEnumListWithEnumList:wrappedError:"); +late final _sel_echoNullableNonNullEnumMapWithEnumMap_error_ = objc + .registerName("echoNullableNonNullEnumMapWithEnumMap:error:"); +late final _sel_echoNullableNonNullEnumMapWithEnumMap_wrappedError_ = objc + .registerName("echoNullableNonNullEnumMapWithEnumMap:wrappedError:"); +late final _sel_echoNullableNonNullIntMapWithIntMap_error_ = objc.registerName( + "echoNullableNonNullIntMapWithIntMap:error:", +); +late final _sel_echoNullableNonNullIntMapWithIntMap_wrappedError_ = objc + .registerName("echoNullableNonNullIntMapWithIntMap:wrappedError:"); +late final _sel_echoNullableNonNullStringMapWithStringMap_error_ = objc + .registerName("echoNullableNonNullStringMapWithStringMap:error:"); +late final _sel_echoNullableNonNullStringMapWithStringMap_wrappedError_ = objc + .registerName("echoNullableNonNullStringMapWithStringMap:wrappedError:"); +late final _sel_echoNullableObjectWithANullableObject_wrappedError_ = objc + .registerName("echoNullableObjectWithANullableObject:wrappedError:"); +late final _sel_echoNullableStringMapWithStringMap_error_ = objc.registerName( + "echoNullableStringMapWithStringMap:error:", +); +late final _sel_echoNullableStringMapWithStringMap_wrappedError_ = objc + .registerName("echoNullableStringMapWithStringMap:wrappedError:"); +late final _sel_echoNullableStringWithANullableString_wrappedError_ = objc + .registerName("echoNullableStringWithANullableString:wrappedError:"); +late final _sel_echoNullableStringWithAString_error_ = objc.registerName( + "echoNullableStringWithAString:error:", +); +late final _sel_echoNullableUint8ListWithANullableUint8List_wrappedError_ = objc + .registerName("echoNullableUint8ListWithANullableUint8List:wrappedError:"); +late final _sel_echoNullableUint8ListWithList_error_ = objc.registerName( + "echoNullableUint8ListWithList:error:", +); +late final _sel_echoObjectWithAnObject_wrappedError_ = objc.registerName( + "echoObjectWithAnObject:wrappedError:", +); +late final _sel_echoOptionalDefaultDoubleWithADouble_wrappedError_ = objc + .registerName("echoOptionalDefaultDoubleWithADouble:wrappedError:"); +late final _sel_echoOptionalNullableIntWithANullableInt_wrappedError_ = objc + .registerName("echoOptionalNullableIntWithANullableInt:wrappedError:"); +late final _sel_echoRequiredIntWithAnInt_wrappedError_ = objc.registerName( + "echoRequiredIntWithAnInt:wrappedError:", +); +late final _sel_echoStringListWithStringList_wrappedError_ = objc.registerName( + "echoStringListWithStringList:wrappedError:", +); +late final _sel_echoStringMapWithStringMap_error_ = objc.registerName( + "echoStringMapWithStringMap:error:", +); +late final _sel_echoStringMapWithStringMap_wrappedError_ = objc.registerName( + "echoStringMapWithStringMap:wrappedError:", +); +late final _sel_echoStringWithAString_error_ = objc.registerName( + "echoStringWithAString:error:", +); +late final _sel_echoStringWithAString_wrappedError_ = objc.registerName( + "echoStringWithAString:wrappedError:", +); +late final _sel_echoUint8ListWithAUint8List_wrappedError_ = objc.registerName( + "echoUint8ListWithAUint8List:wrappedError:", +); +late final _sel_echoUint8ListWithList_error_ = objc.registerName( + "echoUint8ListWithList:error:", +); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +late final _sel_enumList = objc.registerName("enumList"); +late final _sel_enumMap = objc.registerName("enumMap"); +late final _sel_extractNestedNullableStringWithWrapper_wrappedError_ = objc + .registerName("extractNestedNullableStringWithWrapper:wrappedError:"); +late final _sel_getInstanceWithName_ = objc.registerName( + "getInstanceWithName:", +); +late final _sel_hasPassword = objc.registerName("hasPassword"); +late final _sel_hash = objc.registerName("hash"); +late final _sel_identity = objc.registerName("identity"); +late final _sel_init = objc.registerName("init"); +late final _sel_initWithABool_anInt_anInt64_aDouble_aByteArray_a4ByteArray_a8ByteArray_aFloatArray_anEnum_anotherEnum_aString_anObject_list_stringList_intList_doubleList_boolList_enumList_objectList_listList_mapList_map_stringMap_intMap_enumMap_objectMap_listMap_mapMap_ = + objc.registerName( + "initWithABool:anInt:anInt64:aDouble:aByteArray:a4ByteArray:a8ByteArray:aFloatArray:anEnum:anotherEnum:aString:anObject:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:", + ); +late final _sel_initWithAField_ = objc.registerName("initWithAField:"); +late final _sel_initWithANullableBool_aNullableInt_aNullableInt64_aNullableDouble_aNullableByteArray_aNullable4ByteArray_aNullable8ByteArray_aNullableFloatArray_aNullableEnum_anotherNullableEnum_aNullableString_aNullableObject_allNullableTypes_list_stringList_intList_doubleList_boolList_enumList_objectList_listList_mapList_recursiveClassList_map_stringMap_intMap_enumMap_objectMap_listMap_mapMap_recursiveClassMap_ = + objc.registerName( + "initWithANullableBool:aNullableInt:aNullableInt64:aNullableDouble:aNullableByteArray:aNullable4ByteArray:aNullable8ByteArray:aNullableFloatArray:aNullableEnum:anotherNullableEnum:aNullableString:aNullableObject:allNullableTypes:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:recursiveClassList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:recursiveClassMap:", + ); +late final _sel_initWithANullableBool_aNullableInt_aNullableInt64_aNullableDouble_aNullableByteArray_aNullable4ByteArray_aNullable8ByteArray_aNullableFloatArray_aNullableEnum_anotherNullableEnum_aNullableString_aNullableObject_list_stringList_intList_doubleList_boolList_enumList_objectList_listList_mapList_map_stringMap_intMap_enumMap_objectMap_listMap_mapMap_ = + objc.registerName( + "initWithANullableBool:aNullableInt:aNullableInt64:aNullableDouble:aNullableByteArray:aNullable4ByteArray:aNullable8ByteArray:aNullableFloatArray:aNullableEnum:anotherNullableEnum:aNullableString:aNullableObject:list:stringList:intList:doubleList:boolList:enumList:objectList:listList:mapList:map:stringMap:intMap:enumMap:objectMap:listMap:mapMap:", + ); +late final _sel_initWithAllNullableTypes_allNullableTypesWithoutRecursion_allTypes_classList_nullableClassList_classMap_nullableClassMap_ = + objc.registerName( + "initWithAllNullableTypes:allNullableTypesWithoutRecursion:allTypes:classList:nullableClassList:classMap:nullableClassMap:", + ); +late final _sel_initWithCode_message_details_ = objc.registerName( + "initWithCode:message:details:", +); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +late final _sel_initWithData_type_ = objc.registerName("initWithData:type:"); +late final _sel_initWithIdentity_certificates_persistence_ = objc.registerName( + "initWithIdentity:certificates:persistence:", +); +late final _sel_initWithNumber_type_ = objc.registerName( + "initWithNumber:type:", +); +late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); +late final _sel_initWithUser_password_persistence_ = objc.registerName( + "initWithUser:password:persistence:", +); +late final _sel_intList = objc.registerName("intList"); +late final _sel_intMap = objc.registerName("intMap"); +late final _sel_isEqual_ = objc.registerName("isEqual:"); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_list = objc.registerName("list"); +late final _sel_listList = objc.registerName("listList"); +late final _sel_listMap = objc.registerName("listMap"); +late final _sel_map = objc.registerName("map"); +late final _sel_mapList = objc.registerName("mapList"); +late final _sel_mapMap = objc.registerName("mapMap"); +late final _sel_message = objc.registerName("message"); +late final _sel_new = objc.registerName("new"); +late final _sel_noopAsyncWithError_completionHandler_ = objc.registerName( + "noopAsyncWithError:completionHandler:", +); +late final _sel_noopAsyncWithWrappedError_completionHandler_ = objc + .registerName("noopAsyncWithWrappedError:completionHandler:"); +late final _sel_noopWithError_ = objc.registerName("noopWithError:"); +late final _sel_noopWithWrappedError_ = objc.registerName( + "noopWithWrappedError:", +); +late final _sel_nullableClassList = objc.registerName("nullableClassList"); +late final _sel_nullableClassMap = objc.registerName("nullableClassMap"); +late final _sel_number = objc.registerName("number"); +late final _sel_objectList = objc.registerName("objectList"); +late final _sel_objectMap = objc.registerName("objectMap"); +late final _sel_password = objc.registerName("password"); +late final _sel_persistence = objc.registerName("persistence"); +late final _sel_recursiveClassList = objc.registerName("recursiveClassList"); +late final _sel_recursiveClassMap = objc.registerName("recursiveClassMap"); +late final _sel_registerInstanceWithApi_name_ = objc.registerName( + "registerInstanceWithApi:name:", +); +late final _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ = + objc.registerName( + "sendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:error:", + ); +late final _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_wrappedError_ = + objc.registerName( + "sendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError:", + ); +late final _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ = + objc.registerName( + "sendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:error:", + ); +late final _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_wrappedError_ = + objc.registerName( + "sendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError:", + ); +late final _sel_setA4ByteArray_ = objc.registerName("setA4ByteArray:"); +late final _sel_setA8ByteArray_ = objc.registerName("setA8ByteArray:"); +late final _sel_setABool_ = objc.registerName("setABool:"); +late final _sel_setAByteArray_ = objc.registerName("setAByteArray:"); +late final _sel_setADouble_ = objc.registerName("setADouble:"); +late final _sel_setAField_ = objc.registerName("setAField:"); +late final _sel_setAFloatArray_ = objc.registerName("setAFloatArray:"); +late final _sel_setANullable4ByteArray_ = objc.registerName( + "setANullable4ByteArray:", +); +late final _sel_setANullable8ByteArray_ = objc.registerName( + "setANullable8ByteArray:", +); +late final _sel_setANullableBool_ = objc.registerName("setANullableBool:"); +late final _sel_setANullableByteArray_ = objc.registerName( + "setANullableByteArray:", +); +late final _sel_setANullableDouble_ = objc.registerName("setANullableDouble:"); +late final _sel_setANullableEnum_ = objc.registerName("setANullableEnum:"); +late final _sel_setANullableFloatArray_ = objc.registerName( + "setANullableFloatArray:", +); +late final _sel_setANullableInt64_ = objc.registerName("setANullableInt64:"); +late final _sel_setANullableInt_ = objc.registerName("setANullableInt:"); +late final _sel_setANullableObject_ = objc.registerName("setANullableObject:"); +late final _sel_setANullableString_ = objc.registerName("setANullableString:"); +late final _sel_setAString_ = objc.registerName("setAString:"); +late final _sel_setAllNullableTypesWithoutRecursion_ = objc.registerName( + "setAllNullableTypesWithoutRecursion:", +); +late final _sel_setAllNullableTypes_ = objc.registerName( + "setAllNullableTypes:", +); +late final _sel_setAllTypes_ = objc.registerName("setAllTypes:"); +late final _sel_setAnEnum_ = objc.registerName("setAnEnum:"); +late final _sel_setAnInt64_ = objc.registerName("setAnInt64:"); +late final _sel_setAnInt_ = objc.registerName("setAnInt:"); +late final _sel_setAnObject_ = objc.registerName("setAnObject:"); +late final _sel_setAnotherEnum_ = objc.registerName("setAnotherEnum:"); +late final _sel_setAnotherNullableEnum_ = objc.registerName( + "setAnotherNullableEnum:", +); +late final _sel_setBoolList_ = objc.registerName("setBoolList:"); +late final _sel_setClassList_ = objc.registerName("setClassList:"); +late final _sel_setClassMap_ = objc.registerName("setClassMap:"); +late final _sel_setCode_ = objc.registerName("setCode:"); +late final _sel_setDetails_ = objc.registerName("setDetails:"); +late final _sel_setDoubleList_ = objc.registerName("setDoubleList:"); +late final _sel_setEnumList_ = objc.registerName("setEnumList:"); +late final _sel_setEnumMap_ = objc.registerName("setEnumMap:"); +late final _sel_setIntList_ = objc.registerName("setIntList:"); +late final _sel_setIntMap_ = objc.registerName("setIntMap:"); +late final _sel_setListList_ = objc.registerName("setListList:"); +late final _sel_setListMap_ = objc.registerName("setListMap:"); +late final _sel_setList_ = objc.registerName("setList:"); +late final _sel_setMapList_ = objc.registerName("setMapList:"); +late final _sel_setMapMap_ = objc.registerName("setMapMap:"); +late final _sel_setMap_ = objc.registerName("setMap:"); +late final _sel_setMessage_ = objc.registerName("setMessage:"); +late final _sel_setNullableClassList_ = objc.registerName( + "setNullableClassList:", +); +late final _sel_setNullableClassMap_ = objc.registerName( + "setNullableClassMap:", +); +late final _sel_setNumber_ = objc.registerName("setNumber:"); +late final _sel_setObjectList_ = objc.registerName("setObjectList:"); +late final _sel_setObjectMap_ = objc.registerName("setObjectMap:"); +late final _sel_setRecursiveClassList_ = objc.registerName( + "setRecursiveClassList:", +); +late final _sel_setRecursiveClassMap_ = objc.registerName( + "setRecursiveClassMap:", +); +late final _sel_setStringList_ = objc.registerName("setStringList:"); +late final _sel_setStringMap_ = objc.registerName("setStringMap:"); +late final _sel_setType_ = objc.registerName("setType:"); +late final _sel_stringList = objc.registerName("stringList"); +late final _sel_stringMap = objc.registerName("stringMap"); +late final _sel_supportsSecureCoding = objc.registerName( + "supportsSecureCoding", +); +late final _sel_throwAsyncErrorFromVoidWithWrappedError_completionHandler_ = + objc.registerName( + "throwAsyncErrorFromVoidWithWrappedError:completionHandler:", + ); +late final _sel_throwAsyncErrorWithWrappedError_completionHandler_ = objc + .registerName("throwAsyncErrorWithWrappedError:completionHandler:"); +late final _sel_throwAsyncFlutterErrorWithWrappedError_completionHandler_ = objc + .registerName("throwAsyncFlutterErrorWithWrappedError:completionHandler:"); +late final _sel_throwErrorFromVoidWithError_ = objc.registerName( + "throwErrorFromVoidWithError:", +); +late final _sel_throwErrorFromVoidWithWrappedError_ = objc.registerName( + "throwErrorFromVoidWithWrappedError:", +); +late final _sel_throwErrorWithError_ = objc.registerName( + "throwErrorWithError:", +); +late final _sel_throwErrorWithWrappedError_ = objc.registerName( + "throwErrorWithWrappedError:", +); +late final _sel_throwFlutterErrorAsyncWithError_completionHandler_ = objc + .registerName("throwFlutterErrorAsyncWithError:completionHandler:"); +late final _sel_throwFlutterErrorWithError_ = objc.registerName( + "throwFlutterErrorWithError:", +); +late final _sel_throwFlutterErrorWithWrappedError_ = objc.registerName( + "throwFlutterErrorWithWrappedError:", +); +late final _sel_type = objc.registerName("type"); +late final _sel_user = objc.registerName("user"); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = objc.ObjCObject; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.jni.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.jni.dart new file mode 100644 index 000000000000..e25d97cf5302 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.jni.dart @@ -0,0 +1,39658 @@ +// AUTO GENERATED BY JNIGEN 0.16.0. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: argument_type_not_assignable +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: comment_references +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: inference_failure_on_untyped_parameter +// ignore_for_file: invalid_internal_annotation +// ignore_for_file: invalid_use_of_internal_member +// ignore_for_file: library_prefixes +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_library_prefixes +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: only_throw_errors +// ignore_for_file: overridden_fields +// ignore_for_file: prefer_double_quotes +// ignore_for_file: unintended_html_in_doc_comment +// ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_non_null_assertion +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import 'dart:core' as core$_; +import 'dart:core' show Object, String; + +import 'package:jni/_internal.dart' as jni$_; +import 'package:jni/jni.dart' as jni$_; + +/// from: `NiTestsError` +extension type NiTestsError._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NiTestsError'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NiTestsError$Type$(); + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void (java.lang.String string, java.lang.String string1, java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + factory NiTestsError( + jni$_.JString string, + jni$_.JString? string1, + jni$_.JObject? object, + ) { + final _$string = string.reference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$string.pointer, + _$string1.pointer, + _$object.pointer, + ).object(); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (java.lang.String string, java.lang.String string1, java.lang.Object object, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NiTestsError.new$1( + jni$_.JString? string, + jni$_.JString? string1, + jni$_.JObject? object, + core$_.int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$1( + _class.reference.pointer, + _id_new$1.pointer, + _$string.pointer, + _$string1.pointer, + _$object.pointer, + i, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NiTestsError$$Methods on NiTestsError { + static final _id_get$code = NiTestsError._class.instanceMethodId( + r'getCode', + r'()Ljava/lang/String;', + ); + + static final _get$code = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.String getCode()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString get code { + return _get$code( + reference.pointer, + _id_get$code.pointer, + ).object(); + } + + static final _id_get$message = NiTestsError._class.instanceMethodId( + r'getMessage', + r'()Ljava/lang/String;', + ); + + static final _get$message = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public java.lang.String getMessage()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? get message { + return _get$message( + reference.pointer, + _id_get$message.pointer, + ).object(); + } + + static final _id_get$details = NiTestsError._class.instanceMethodId( + r'getDetails', + r'()Ljava/lang/Object;', + ); + + static final _get$details = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Object getDetails()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? get details { + return _get$details( + reference.pointer, + _id_get$details.pointer, + ).object(); + } +} + +final class $NiTestsError$Type$ extends jni$_.JType { + @jni$_.internal + const $NiTestsError$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNiTestsError;'; +} + +/// from: `NIHostIntegrationCoreApi` +extension type NIHostIntegrationCoreApi._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIHostIntegrationCoreApi'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIHostIntegrationCoreApi$Type$(); +} + +extension NIHostIntegrationCoreApi$$Methods on NIHostIntegrationCoreApi { + static final _id_noop = NIHostIntegrationCoreApi._class.instanceMethodId( + r'noop', + r'()V', + ); + + static final _noop = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun noop(): kotlin.Unit` + void noop() { + _noop(reference.pointer, _id_noop.pointer).check(); + } + + static final _id_echoAllTypes = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoAllTypes', r'(LNIAllTypes;)LNIAllTypes;'); + + static final _echoAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes echoAllTypes(NIAllTypes nIAllTypes) { + final _$nIAllTypes = nIAllTypes.reference; + return _echoAllTypes( + reference.pointer, + _id_echoAllTypes.pointer, + _$nIAllTypes.pointer, + ).object(); + } + + static final _id_throwError = NIHostIntegrationCoreApi._class + .instanceMethodId(r'throwError', r'()Ljava/lang/Object;'); + + static final _throwError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwError() { + return _throwError( + reference.pointer, + _id_throwError.pointer, + ).object(); + } + + static final _id_throwErrorFromVoid = NIHostIntegrationCoreApi._class + .instanceMethodId(r'throwErrorFromVoid', r'()V'); + + static final _throwErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwErrorFromVoid(): kotlin.Unit` + void throwErrorFromVoid() { + _throwErrorFromVoid( + reference.pointer, + _id_throwErrorFromVoid.pointer, + ).check(); + } + + static final _id_throwFlutterError = NIHostIntegrationCoreApi._class + .instanceMethodId(r'throwFlutterError', r'()Ljava/lang/Object;'); + + static final _throwFlutterError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwFlutterError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwFlutterError() { + return _throwFlutterError( + reference.pointer, + _id_throwFlutterError.pointer, + ).object(); + } + + static final _id_echoInt = NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoInt', + r'(J)J', + ); + + static final _echoInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoInt(anInt: kotlin.Long): kotlin.Long` + core$_.int echoInt(core$_.int j) { + return _echoInt(reference.pointer, _id_echoInt.pointer, j).long; + } + + static final _id_echoDouble = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoDouble', r'(D)D'); + + static final _echoDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun echoDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double echoDouble(core$_.double d) { + return _echoDouble( + reference.pointer, + _id_echoDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_echoBool = NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoBool', + r'(Z)Z', + ); + + static final _echoBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoBool(aBool: kotlin.Boolean): kotlin.Boolean` + core$_.bool echoBool(core$_.bool z) { + return _echoBool( + reference.pointer, + _id_echoBool.pointer, + z ? 1 : 0, + ).boolean; + } + + static final _id_echoString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoString(jni$_.JString string) { + final _$string = string.reference; + return _echoString( + reference.pointer, + _id_echoString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoUint8List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoUint8List', r'([B)[B'); + + static final _echoUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoUint8List(aUint8List: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray echoUint8List(jni$_.JByteArray bs) { + final _$bs = bs.reference; + return _echoUint8List( + reference.pointer, + _id_echoUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_echoInt32List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoInt32List', r'([I)[I'); + + static final _echoInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoInt32List(aInt32List: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray echoInt32List(jni$_.JIntArray is$) { + final _$is$ = is$.reference; + return _echoInt32List( + reference.pointer, + _id_echoInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_echoInt64List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoInt64List', r'([J)[J'); + + static final _echoInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoInt64List(aInt64List: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray echoInt64List(jni$_.JLongArray js) { + final _$js = js.reference; + return _echoInt64List( + reference.pointer, + _id_echoInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_echoFloat64List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoFloat64List', r'([D)[D'); + + static final _echoFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoFloat64List(aFloat64List: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray echoFloat64List(jni$_.JDoubleArray ds) { + final _$ds = ds.reference; + return _echoFloat64List( + reference.pointer, + _id_echoFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_echoObject = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject echoObject(jni$_.JObject object) { + final _$object = object.reference; + return _echoObject( + reference.pointer, + _id_echoObject.pointer, + _$object.pointer, + ).object(); + } + + static final _id_echoList = NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoList(jni$_.JList list) { + final _$list = list.reference; + return _echoList( + reference.pointer, + _id_echoList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoStringList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoStringList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoStringList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoStringList(stringList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoStringList(jni$_.JList list) { + final _$list = list.reference; + return _echoStringList( + reference.pointer, + _id_echoStringList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoIntList = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoIntList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoIntList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoIntList(intList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoIntList(jni$_.JList list) { + final _$list = list.reference; + return _echoIntList( + reference.pointer, + _id_echoIntList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoDoubleList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoDoubleList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoDoubleList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoDoubleList(doubleList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoDoubleList(jni$_.JList list) { + final _$list = list.reference; + return _echoDoubleList( + reference.pointer, + _id_echoDoubleList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoBoolList = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoBoolList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoBoolList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoBoolList(boolList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoBoolList(jni$_.JList list) { + final _$list = list.reference; + return _echoBoolList( + reference.pointer, + _id_echoBoolList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoEnumList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoEnumList(jni$_.JList list) { + final _$list = list.reference; + return _echoEnumList( + reference.pointer, + _id_echoEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoClassList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoClassList( + reference.pointer, + _id_echoClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoNonNullEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullEnumList(jni$_.JList list) { + final _$list = list.reference; + return _echoNonNullEnumList( + reference.pointer, + _id_echoNonNullEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoNonNullClassList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullClassList( + reference.pointer, + _id_echoNonNullClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoMap = NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoMap( + reference.pointer, + _id_echoMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoStringMap = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoStringMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoStringMap( + reference.pointer, + _id_echoStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoIntMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoIntMap( + reference.pointer, + _id_echoIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoEnumMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoEnumMap( + reference.pointer, + _id_echoEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoClassMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoClassMap( + reference.pointer, + _id_echoClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullStringMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullStringMap( + reference.pointer, + _id_echoNonNullStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullIntMap( + reference.pointer, + _id_echoNonNullIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullEnumMap( + reference.pointer, + _id_echoNonNullEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullClassMap( + reference.pointer, + _id_echoNonNullClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoClassWrapper = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoClassWrapper', + r'(LNIAllClassesWrapper;)LNIAllClassesWrapper;', + ); + + static final _echoClassWrapper = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassWrapper(wrapper: NIAllClassesWrapper): NIAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NIAllClassesWrapper echoClassWrapper( + NIAllClassesWrapper nIAllClassesWrapper, + ) { + final _$nIAllClassesWrapper = nIAllClassesWrapper.reference; + return _echoClassWrapper( + reference.pointer, + _id_echoClassWrapper.pointer, + _$nIAllClassesWrapper.pointer, + ).object(); + } + + static final _id_echoEnum = NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoEnum', + r'(LNIAnEnum;)LNIAnEnum;', + ); + + static final _echoEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum echoEnum(NIAnEnum nIAnEnum) { + final _$nIAnEnum = nIAnEnum.reference; + return _echoEnum( + reference.pointer, + _id_echoEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _echoAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum echoAnotherEnum(NIAnotherEnum nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum.reference; + return _echoAnotherEnum( + reference.pointer, + _id_echoAnotherEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_echoNamedDefaultString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNamedDefaultString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedDefaultString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNamedDefaultString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoNamedDefaultString(jni$_.JString string) { + final _$string = string.reference; + return _echoNamedDefaultString( + reference.pointer, + _id_echoNamedDefaultString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoOptionalDefaultDouble = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoOptionalDefaultDouble', r'(D)D'); + + static final _echoOptionalDefaultDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun echoOptionalDefaultDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double echoOptionalDefaultDouble(core$_.double d) { + return _echoOptionalDefaultDouble( + reference.pointer, + _id_echoOptionalDefaultDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_echoRequiredInt = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoRequiredInt', r'(J)J'); + + static final _echoRequiredInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoRequiredInt(anInt: kotlin.Long): kotlin.Long` + core$_.int echoRequiredInt(core$_.int j) { + return _echoRequiredInt( + reference.pointer, + _id_echoRequiredInt.pointer, + j, + ).long; + } + + static final _id_echoAllNullableTypes = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAllNullableTypes', + r'(LNIAllNullableTypes;)LNIAllNullableTypes;', + ); + + static final _echoAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? echoAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypes( + reference.pointer, + _id_echoAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + ).object(); + } + + static final _id_echoAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _echoAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_extractNestedNullableString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'extractNestedNullableString', + r'(LNIAllClassesWrapper;)Ljava/lang/String;', + ); + + static final _extractNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun extractNestedNullableString(wrapper: NIAllClassesWrapper): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? extractNestedNullableString( + NIAllClassesWrapper nIAllClassesWrapper, + ) { + final _$nIAllClassesWrapper = nIAllClassesWrapper.reference; + return _extractNestedNullableString( + reference.pointer, + _id_extractNestedNullableString.pointer, + _$nIAllClassesWrapper.pointer, + ).object(); + } + + static final _id_createNestedNullableString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'createNestedNullableString', + r'(Ljava/lang/String;)LNIAllClassesWrapper;', + ); + + static final _createNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun createNestedNullableString(nullableString: kotlin.String?): NIAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NIAllClassesWrapper createNestedNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _createNestedNullableString( + reference.pointer, + _id_createNestedNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypes = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypes;', + ); + + static final _sendMultipleNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun sendMultipleNullableTypes(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypes( + reference.pointer, + _id_sendMultipleNullableTypes.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypesWithoutRecursion = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _sendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun sendMultipleNullableTypesWithoutRecursion(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_sendMultipleNullableTypesWithoutRecursion.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoNullableInt = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt(aNullableInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoNullableInt( + reference.pointer, + _id_echoNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_echoNullableDouble = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _echoNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableDouble(aNullableDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? echoNullableDouble(jni$_.JDouble? double) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _echoNullableDouble( + reference.pointer, + _id_echoNullableDouble.pointer, + _$double.pointer, + ).object(); + } + + static final _id_echoNullableBool = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _echoNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableBool(aNullableBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? echoNullableBool(jni$_.JBoolean? boolean) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _echoNullableBool( + reference.pointer, + _id_echoNullableBool.pointer, + _$boolean.pointer, + ).object(); + } + + static final _id_echoNullableString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableString(aNullableString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNullableString( + reference.pointer, + _id_echoNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoNullableUint8List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoNullableUint8List', r'([B)[B'); + + static final _echoNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableUint8List(aNullableUint8List: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? echoNullableUint8List(jni$_.JByteArray? bs) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _echoNullableUint8List( + reference.pointer, + _id_echoNullableUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_echoNullableInt32List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoNullableInt32List', r'([I)[I'); + + static final _echoNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt32List(aNullableInt32List: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? echoNullableInt32List(jni$_.JIntArray? is$) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _echoNullableInt32List( + reference.pointer, + _id_echoNullableInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_echoNullableInt64List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoNullableInt64List', r'([J)[J'); + + static final _echoNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt64List(aNullableInt64List: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? echoNullableInt64List(jni$_.JLongArray? js) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _echoNullableInt64List( + reference.pointer, + _id_echoNullableInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_echoNullableFloat64List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoNullableFloat64List', r'([D)[D'); + + static final _echoNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableFloat64List(aNullableFloat64List: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? echoNullableFloat64List(jni$_.JDoubleArray? ds) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _echoNullableFloat64List( + reference.pointer, + _id_echoNullableFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_echoNullableObject = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableObject(aNullableObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? echoNullableObject(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _echoNullableObject( + reference.pointer, + _id_echoNullableObject.pointer, + _$object.pointer, + ).object(); + } + + static final _id_echoNullableList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableList(aNullableList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableList( + reference.pointer, + _id_echoNullableList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableEnumList(jni$_.JList? list) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableEnumList( + reference.pointer, + _id_echoNullableEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableClassList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableClassList( + reference.pointer, + _id_echoNullableClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumList( + reference.pointer, + _id_echoNullableNonNullEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullClassList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassList( + reference.pointer, + _id_echoNullableNonNullClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableMap( + reference.pointer, + _id_echoNullableMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableStringMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableStringMap( + reference.pointer, + _id_echoNullableStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableIntMap( + reference.pointer, + _id_echoNullableIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableEnumMap( + reference.pointer, + _id_echoNullableEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableClassMap( + reference.pointer, + _id_echoNullableClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullStringMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullStringMap( + reference.pointer, + _id_echoNullableNonNullStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullIntMap( + reference.pointer, + _id_echoNullableNonNullIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumMap( + reference.pointer, + _id_echoNullableNonNullEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassMap( + reference.pointer, + _id_echoNullableNonNullClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableEnum = NIHostIntegrationCoreApi._class + .instanceMethodId(r'echoNullableEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _echoNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? echoNullableEnum(NIAnEnum? nIAnEnum) { + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum( + reference.pointer, + _id_echoNullableEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherNullableEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherNullableEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _echoAnotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_echoOptionalNullableInt = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoOptionalNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoOptionalNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoOptionalNullableInt(aNullableInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoOptionalNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoOptionalNullableInt( + reference.pointer, + _id_echoOptionalNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_echoNamedNullableString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoNamedNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNamedNullableString(aNullableString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNamedNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNamedNullableString( + reference.pointer, + _id_echoNamedNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_noopAsync = NIHostIntegrationCoreApi._class.instanceMethodId( + r'noopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _noopAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun noopAsync(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future noopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _noopAsync( + reference.pointer, + _id_noopAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_echoAsyncInt = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt(anInt: kotlin.Long): kotlin.Long` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt(core$_.int j) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncInt( + reference.pointer, + _id_echoAsyncInt.pointer, + j, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncDouble = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncDouble(aDouble: kotlin.Double): kotlin.Double` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncDouble(core$_.double d) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncDouble( + reference.pointer, + _id_echoAsyncDouble.pointer, + d, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncBool = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncBool(aBool: kotlin.Boolean): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncBool(core$_.bool z) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncBool( + reference.pointer, + _id_echoAsyncBool.pointer, + z ? 1 : 0, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncString(jni$_.JString string) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echoAsyncString( + reference.pointer, + _id_echoAsyncString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncUint8List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncUint8List(aUint8List: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _echoAsyncUint8List( + reference.pointer, + _id_echoAsyncUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt32List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt32List(aInt32List: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt32List(jni$_.JIntArray is$) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _echoAsyncInt32List( + reference.pointer, + _id_echoAsyncInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt64List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt64List(aInt64List: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _echoAsyncInt64List( + reference.pointer, + _id_echoAsyncInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncFloat64List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncFloat64List(aFloat64List: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _echoAsyncFloat64List( + reference.pointer, + _id_echoAsyncFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncObject = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncObject(jni$_.JObject object) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _echoAsyncObject( + reference.pointer, + _id_echoAsyncObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncList( + reference.pointer, + _id_echoAsyncList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncEnumList( + reference.pointer, + _id_echoAsyncEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncClassList( + reference.pointer, + _id_echoAsyncClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncMap( + reference.pointer, + _id_echoAsyncMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncStringMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncStringMap( + reference.pointer, + _id_echoAsyncStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncIntMap( + reference.pointer, + _id_echoAsyncIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncEnumMap( + reference.pointer, + _id_echoAsyncEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + echoAsyncClassMap(jni$_.JMap map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncClassMap( + reference.pointer, + _id_echoAsyncClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum(NIAnEnum nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherAsyncEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_throwAsyncError = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'throwAsyncError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwAsyncError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncError( + reference.pointer, + _id_throwAsyncError.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_throwAsyncErrorFromVoid = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'throwAsyncErrorFromVoid', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwAsyncErrorFromVoid(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncErrorFromVoid() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncErrorFromVoid( + reference.pointer, + _id_throwAsyncErrorFromVoid.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_throwAsyncFlutterError = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'throwAsyncFlutterError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncFlutterError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwAsyncFlutterError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncFlutterError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncFlutterError( + reference.pointer, + _id_throwAsyncFlutterError.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNIAllTypes = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNIAllTypes', + r'(LNIAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNIAllTypes(NIAllTypes nIAllTypes) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllTypes = nIAllTypes.reference; + final $r = _echoAsyncNIAllTypes( + reference.pointer, + _id_echoAsyncNIAllTypes.pointer, + _$nIAllTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAllTypes.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableNIAllNullableTypes = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNIAllNullableTypes', + r'(LNIAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNIAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNIAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableNIAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt(jni$_.JLong? long) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt( + reference.pointer, + _id_echoAsyncNullableInt.pointer, + _$long.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableDouble = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableDouble( + reference.pointer, + _id_echoAsyncNullableDouble.pointer, + _$double.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableBool = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableBool( + reference.pointer, + _id_echoAsyncNullableBool.pointer, + _$boolean.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableString( + reference.pointer, + _id_echoAsyncNullableString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableUint8List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableUint8List(aUint8List: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableUint8List( + reference.pointer, + _id_echoAsyncNullableUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt32List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt32List(aInt32List: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt32List( + reference.pointer, + _id_echoAsyncNullableInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt64List = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt64List(aInt64List: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt64List( + reference.pointer, + _id_echoAsyncNullableInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableFloat64List = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableFloat64List(aFloat64List: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableFloat64List( + reference.pointer, + _id_echoAsyncNullableFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableObject = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableObject(anObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableObject( + reference.pointer, + _id_echoAsyncNullableObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNullableList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableList( + reference.pointer, + _id_echoAsyncNullableList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumList( + reference.pointer, + _id_echoAsyncNullableEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassList( + reference.pointer, + _id_echoAsyncNullableClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableMap(jni$_.JMap? map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableMap( + reference.pointer, + _id_echoAsyncNullableMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableStringMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableStringMap( + reference.pointer, + _id_echoAsyncNullableStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableIntMap(jni$_.JMap? map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableIntMap( + reference.pointer, + _id_echoAsyncNullableIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumMap( + reference.pointer, + _id_echoAsyncNullableEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassMap( + reference.pointer, + _id_echoAsyncNullableClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum(NIAnEnum? nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncNullableEnum = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterNoop = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterNoop', r'()V'); + + static final _callFlutterNoop = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun callFlutterNoop(): kotlin.Unit` + void callFlutterNoop() { + _callFlutterNoop(reference.pointer, _id_callFlutterNoop.pointer).check(); + } + + static final _id_callFlutterThrowError = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterThrowError', r'()Ljava/lang/Object;'); + + static final _callFlutterThrowError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun callFlutterThrowError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? callFlutterThrowError() { + return _callFlutterThrowError( + reference.pointer, + _id_callFlutterThrowError.pointer, + ).object(); + } + + static final _id_callFlutterThrowErrorFromVoid = NIHostIntegrationCoreApi + ._class + .instanceMethodId(r'callFlutterThrowErrorFromVoid', r'()V'); + + static final _callFlutterThrowErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun callFlutterThrowErrorFromVoid(): kotlin.Unit` + void callFlutterThrowErrorFromVoid() { + _callFlutterThrowErrorFromVoid( + reference.pointer, + _id_callFlutterThrowErrorFromVoid.pointer, + ).check(); + } + + static final _id_callFlutterEchoNIAllTypes = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNIAllTypes', + r'(LNIAllTypes;)LNIAllTypes;', + ); + + static final _callFlutterEchoNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes callFlutterEchoNIAllTypes(NIAllTypes nIAllTypes) { + final _$nIAllTypes = nIAllTypes.reference; + return _callFlutterEchoNIAllTypes( + reference.pointer, + _id_callFlutterEchoNIAllTypes.pointer, + _$nIAllTypes.pointer, + ).object(); + } + + static final _id_callFlutterEchoNIAllNullableTypes = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNIAllNullableTypes', + r'(LNIAllNullableTypes;)LNIAllNullableTypes;', + ); + + static final _callFlutterEchoNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? callFlutterEchoNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNIAllNullableTypes( + reference.pointer, + _id_callFlutterEchoNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypes = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypes;', + ); + + static final _callFlutterSendMultipleNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterSendMultipleNullableTypes(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes callFlutterSendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _callFlutterSendMultipleNullableTypes( + reference.pointer, + _id_callFlutterSendMultipleNullableTypes.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoNIAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _callFlutterEchoNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? + callFlutterEchoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoNIAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypesWithoutRecursion = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _callFlutterSendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterSendMultipleNullableTypesWithoutRecursion(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion + callFlutterSendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _callFlutterSendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterSendMultipleNullableTypesWithoutRecursion.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoBool = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoBool', r'(Z)Z'); + + static final _callFlutterEchoBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun callFlutterEchoBool(aBool: kotlin.Boolean): kotlin.Boolean` + core$_.bool callFlutterEchoBool(core$_.bool z) { + return _callFlutterEchoBool( + reference.pointer, + _id_callFlutterEchoBool.pointer, + z ? 1 : 0, + ).boolean; + } + + static final _id_callFlutterEchoInt = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoInt', r'(J)J'); + + static final _callFlutterEchoInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun callFlutterEchoInt(anInt: kotlin.Long): kotlin.Long` + core$_.int callFlutterEchoInt(core$_.int j) { + return _callFlutterEchoInt( + reference.pointer, + _id_callFlutterEchoInt.pointer, + j, + ).long; + } + + static final _id_callFlutterEchoDouble = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoDouble', r'(D)D'); + + static final _callFlutterEchoDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun callFlutterEchoDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double callFlutterEchoDouble(core$_.double d) { + return _callFlutterEchoDouble( + reference.pointer, + _id_callFlutterEchoDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_callFlutterEchoString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _callFlutterEchoString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString callFlutterEchoString(jni$_.JString string) { + final _$string = string.reference; + return _callFlutterEchoString( + reference.pointer, + _id_callFlutterEchoString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoUint8List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoUint8List', r'([B)[B'); + + static final _callFlutterEchoUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoUint8List(list: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray callFlutterEchoUint8List(jni$_.JByteArray bs) { + final _$bs = bs.reference; + return _callFlutterEchoUint8List( + reference.pointer, + _id_callFlutterEchoUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_callFlutterEchoInt32List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoInt32List', r'([I)[I'); + + static final _callFlutterEchoInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoInt32List(list: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray callFlutterEchoInt32List(jni$_.JIntArray is$) { + final _$is$ = is$.reference; + return _callFlutterEchoInt32List( + reference.pointer, + _id_callFlutterEchoInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_callFlutterEchoInt64List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoInt64List', r'([J)[J'); + + static final _callFlutterEchoInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoInt64List(list: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray callFlutterEchoInt64List(jni$_.JLongArray js) { + final _$js = js.reference; + return _callFlutterEchoInt64List( + reference.pointer, + _id_callFlutterEchoInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_callFlutterEchoFloat64List = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoFloat64List', r'([D)[D'); + + static final _callFlutterEchoFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoFloat64List(list: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray callFlutterEchoFloat64List(jni$_.JDoubleArray ds) { + final _$ds = ds.reference; + return _callFlutterEchoFloat64List( + reference.pointer, + _id_callFlutterEchoFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_callFlutterEchoList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoList( + reference.pointer, + _id_callFlutterEchoList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoEnumList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoEnumList(jni$_.JList list) { + final _$list = list.reference; + return _callFlutterEchoEnumList( + reference.pointer, + _id_callFlutterEchoEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoClassList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoClassList( + reference.pointer, + _id_callFlutterEchoClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullEnumList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoNonNullEnumList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoNonNullEnumList( + reference.pointer, + _id_callFlutterEchoNonNullEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullClassList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoNonNullClassList( + reference.pointer, + _id_callFlutterEchoNonNullClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoMap( + reference.pointer, + _id_callFlutterEchoMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoStringMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoStringMap( + reference.pointer, + _id_callFlutterEchoStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoIntMap( + reference.pointer, + _id_callFlutterEchoIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoEnumMap( + reference.pointer, + _id_callFlutterEchoEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoClassMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoClassMap( + reference.pointer, + _id_callFlutterEchoClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullStringMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullStringMap( + reference.pointer, + _id_callFlutterEchoNonNullStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullIntMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullIntMap( + reference.pointer, + _id_callFlutterEchoNonNullIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullEnumMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullEnumMap( + reference.pointer, + _id_callFlutterEchoNonNullEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullClassMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullClassMap( + reference.pointer, + _id_callFlutterEchoNonNullClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoEnum = NIHostIntegrationCoreApi._class + .instanceMethodId(r'callFlutterEchoEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _callFlutterEchoEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum callFlutterEchoEnum(NIAnEnum nIAnEnum) { + final _$nIAnEnum = nIAnEnum.reference; + return _callFlutterEchoEnum( + reference.pointer, + _id_callFlutterEchoEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNIAnotherEnum = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNIAnotherEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _callFlutterEchoNIAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum callFlutterEchoNIAnotherEnum(NIAnotherEnum nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum.reference; + return _callFlutterEchoNIAnotherEnum( + reference.pointer, + _id_callFlutterEchoNIAnotherEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableBool = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _callFlutterEchoNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? callFlutterEchoNullableBool(jni$_.JBoolean? boolean) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableBool( + reference.pointer, + _id_callFlutterEchoNullableBool.pointer, + _$boolean.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableInt = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _callFlutterEchoNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? callFlutterEchoNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableInt( + reference.pointer, + _id_callFlutterEchoNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableDouble = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _callFlutterEchoNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? callFlutterEchoNullableDouble(jni$_.JDouble? double) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableDouble( + reference.pointer, + _id_callFlutterEchoNullableDouble.pointer, + _$double.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableString = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _callFlutterEchoNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? callFlutterEchoNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableString( + reference.pointer, + _id_callFlutterEchoNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableUint8List = NIHostIntegrationCoreApi + ._class + .instanceMethodId(r'callFlutterEchoNullableUint8List', r'([B)[B'); + + static final _callFlutterEchoNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableUint8List(list: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? callFlutterEchoNullableUint8List(jni$_.JByteArray? bs) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableUint8List( + reference.pointer, + _id_callFlutterEchoNullableUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableInt32List = NIHostIntegrationCoreApi + ._class + .instanceMethodId(r'callFlutterEchoNullableInt32List', r'([I)[I'); + + static final _callFlutterEchoNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableInt32List(list: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? callFlutterEchoNullableInt32List(jni$_.JIntArray? is$) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableInt32List( + reference.pointer, + _id_callFlutterEchoNullableInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableInt64List = NIHostIntegrationCoreApi + ._class + .instanceMethodId(r'callFlutterEchoNullableInt64List', r'([J)[J'); + + static final _callFlutterEchoNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableInt64List(list: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? callFlutterEchoNullableInt64List(jni$_.JLongArray? js) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableInt64List( + reference.pointer, + _id_callFlutterEchoNullableInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableFloat64List = NIHostIntegrationCoreApi + ._class + .instanceMethodId(r'callFlutterEchoNullableFloat64List', r'([D)[D'); + + static final _callFlutterEchoNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableFloat64List(list: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? callFlutterEchoNullableFloat64List( + jni$_.JDoubleArray? ds, + ) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableFloat64List( + reference.pointer, + _id_callFlutterEchoNullableFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableList( + reference.pointer, + _id_callFlutterEchoNullableList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableEnumList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnumList( + reference.pointer, + _id_callFlutterEchoNullableEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableClassList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableClassList( + reference.pointer, + _id_callFlutterEchoNullableClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullEnumList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullEnumList( + reference.pointer, + _id_callFlutterEchoNullableNonNullEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullClassList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullClassList( + reference.pointer, + _id_callFlutterEchoNullableNonNullClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableMap( + reference.pointer, + _id_callFlutterEchoNullableMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableStringMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableStringMap( + reference.pointer, + _id_callFlutterEchoNullableStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableIntMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableIntMap( + reference.pointer, + _id_callFlutterEchoNullableIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableEnumMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnumMap( + reference.pointer, + _id_callFlutterEchoNullableEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableClassMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + callFlutterEchoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableClassMap( + reference.pointer, + _id_callFlutterEchoNullableClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullStringMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + callFlutterEchoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullStringMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullIntMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullIntMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullEnumMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullEnumMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullClassMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + callFlutterEchoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullClassMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNullableEnum', + r'(LNIAnEnum;)LNIAnEnum;', + ); + + static final _callFlutterEchoNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? callFlutterEchoNullableEnum(NIAnEnum? nIAnEnum) { + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnum( + reference.pointer, + _id_callFlutterEchoNullableEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoAnotherNullableEnum = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAnotherNullableEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _callFlutterEchoAnotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? callFlutterEchoAnotherNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) { + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoAnotherNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherNullableEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterNoopAsync = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterNoopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterNoopAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterNoopAsync(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterNoopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterNoopAsync( + reference.pointer, + _id_callFlutterNoopAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_callFlutterEchoAsyncNIAllTypes = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNIAllTypes', + r'(LNIAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNIAllTypes( + NIAllTypes nIAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllTypes = nIAllTypes.reference; + final $r = _callFlutterEchoAsyncNIAllTypes( + reference.pointer, + _id_callFlutterEchoAsyncNIAllTypes.pointer, + _$nIAllTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAllTypes.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableNIAllNullableTypes = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNIAllNullableTypes', + r'(LNIAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNIAllNullableTypes( + reference.pointer, + _id_callFlutterEchoAsyncNullableNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion + .pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncBool = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncBool(aBool: kotlin.Boolean): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncBool(core$_.bool z) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterEchoAsyncBool( + reference.pointer, + _id_callFlutterEchoAsyncBool.pointer, + z ? 1 : 0, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncInt = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncInt(anInt: kotlin.Long): kotlin.Long` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncInt(core$_.int j) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterEchoAsyncInt( + reference.pointer, + _id_callFlutterEchoAsyncInt.pointer, + j, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncDouble = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncDouble(aDouble: kotlin.Double): kotlin.Double` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncDouble( + core$_.double d, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterEchoAsyncDouble( + reference.pointer, + _id_callFlutterEchoAsyncDouble.pointer, + d, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncString = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncString( + jni$_.JString string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _callFlutterEchoAsyncString( + reference.pointer, + _id_callFlutterEchoAsyncString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncUint8List = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncUint8List(list: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _callFlutterEchoAsyncUint8List( + reference.pointer, + _id_callFlutterEchoAsyncUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncInt32List = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncInt32List(list: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncInt32List( + jni$_.JIntArray is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _callFlutterEchoAsyncInt32List( + reference.pointer, + _id_callFlutterEchoAsyncInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncInt64List = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncInt64List(list: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _callFlutterEchoAsyncInt64List( + reference.pointer, + _id_callFlutterEchoAsyncInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncFloat64List = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncFloat64List(list: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _callFlutterEchoAsyncFloat64List( + reference.pointer, + _id_callFlutterEchoAsyncFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncObject = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncObject( + jni$_.JObject object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _callFlutterEchoAsyncObject( + reference.pointer, + _id_callFlutterEchoAsyncObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncList = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncList( + reference.pointer, + _id_callFlutterEchoAsyncList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncEnumList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncEnumList( + reference.pointer, + _id_callFlutterEchoAsyncEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncClassList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncClassList( + reference.pointer, + _id_callFlutterEchoAsyncClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNonNullEnumList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNonNullEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncNonNullEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncNonNullEnumList( + reference.pointer, + _id_callFlutterEchoAsyncNonNullEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNonNullClassList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNonNullClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncNonNullClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncNonNullClassList( + reference.pointer, + _id_callFlutterEchoAsyncNonNullClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncMap( + reference.pointer, + _id_callFlutterEchoAsyncMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncStringMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncStringMap( + reference.pointer, + _id_callFlutterEchoAsyncStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncIntMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncIntMap(jni$_.JMap map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncIntMap( + reference.pointer, + _id_callFlutterEchoAsyncIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncEnumMap = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncEnumMap( + reference.pointer, + _id_callFlutterEchoAsyncEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncClassMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncClassMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncClassMap( + reference.pointer, + _id_callFlutterEchoAsyncClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncEnum = NIHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncEnum(NIAnEnum nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum.reference; + final $r = _callFlutterEchoAsyncEnum( + reference.pointer, + _id_callFlutterEchoAsyncEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncEnum = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAnotherAsyncEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAnotherAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum.reference; + final $r = _callFlutterEchoAnotherAsyncEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableBool = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableBool( + reference.pointer, + _id_callFlutterEchoAsyncNullableBool.pointer, + _$boolean.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableInt = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableInt( + jni$_.JLong? long, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableInt( + reference.pointer, + _id_callFlutterEchoAsyncNullableInt.pointer, + _$long.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableDouble = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableDouble( + reference.pointer, + _id_callFlutterEchoAsyncNullableDouble.pointer, + _$double.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableString = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableString( + reference.pointer, + _id_callFlutterEchoAsyncNullableString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableUint8List = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableUint8List(list: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableUint8List( + reference.pointer, + _id_callFlutterEchoAsyncNullableUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableInt32List = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableInt32List(list: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableInt32List( + reference.pointer, + _id_callFlutterEchoAsyncNullableInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableInt64List = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableInt64List(list: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableInt64List( + reference.pointer, + _id_callFlutterEchoAsyncNullableInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableFloat64List = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableFloat64List(list: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableFloat64List( + reference.pointer, + _id_callFlutterEchoAsyncNullableFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterThrowFlutterErrorAsync = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterThrowFlutterErrorAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterThrowFlutterErrorAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterThrowFlutterErrorAsync(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterThrowFlutterErrorAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterThrowFlutterErrorAsync( + reference.pointer, + _id_callFlutterThrowFlutterErrorAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableObject = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableObject(anObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableObject( + reference.pointer, + _id_callFlutterEchoAsyncNullableObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableList = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> callFlutterEchoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableList( + reference.pointer, + _id_callFlutterEchoAsyncNullableList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableEnumList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> callFlutterEchoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnumList( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableClassList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableClassList( + reference.pointer, + _id_callFlutterEchoAsyncNullableClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNonNullEnumList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNonNullEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableNonNullEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNonNullEnumList( + reference.pointer, + _id_callFlutterEchoAsyncNullableNonNullEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNonNullClassList = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNonNullClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableNonNullClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNonNullClassList( + reference.pointer, + _id_callFlutterEchoAsyncNullableNonNullClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableStringMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableStringMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableIntMap = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableIntMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableIntMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableEnumMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnumMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableClassMap = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableClassMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableEnum = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableEnum( + NIAnEnum? nIAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncNullableEnum = + NIHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAnotherAsyncNullableEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAnotherAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncNullableEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_defaultIsMainThread = NIHostIntegrationCoreApi._class + .instanceMethodId(r'defaultIsMainThread', r'()Z'); + + static final _defaultIsMainThread = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun defaultIsMainThread(): kotlin.Boolean` + core$_.bool defaultIsMainThread() { + return _defaultIsMainThread( + reference.pointer, + _id_defaultIsMainThread.pointer, + ).boolean; + } + + static final _id_callFlutterNoopOnBackgroundThread = NIHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterNoopOnBackgroundThread', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterNoopOnBackgroundThread = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterNoopOnBackgroundThread(): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterNoopOnBackgroundThread() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterNoopOnBackgroundThread( + reference.pointer, + _id_callFlutterNoopOnBackgroundThread.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } +} + +final class $NIHostIntegrationCoreApi$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIHostIntegrationCoreApi$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIHostIntegrationCoreApi;'; +} + +/// from: `NIHostIntegrationCoreApiRegistrar` +extension type NIHostIntegrationCoreApiRegistrar._(jni$_.JObject _$this) + implements NIHostIntegrationCoreApi { + static final _class = jni$_.JClass.forName( + r'NIHostIntegrationCoreApiRegistrar', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIHostIntegrationCoreApiRegistrar$Type$(); + static final _id_new$ = _class.constructorId(r'()V'); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NIHostIntegrationCoreApiRegistrar() { + return _new$( + _class.reference.pointer, + _id_new$.pointer, + ).object(); + } +} + +extension NIHostIntegrationCoreApiRegistrar$$Methods + on NIHostIntegrationCoreApiRegistrar { + static final _id_get$api = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'getApi', r'()LNIHostIntegrationCoreApi;'); + + static final _get$api = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIHostIntegrationCoreApi getApi()` + /// The returned object must be released after use, by calling the [release] method. + NIHostIntegrationCoreApi? get api { + return _get$api( + reference.pointer, + _id_get$api.pointer, + ).object(); + } + + static final _id_set$api = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'setApi', r'(LNIHostIntegrationCoreApi;)V'); + + static final _set$api = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public final void setApi(NIHostIntegrationCoreApi nIHostIntegrationCoreApi)` + set api(NIHostIntegrationCoreApi? nIHostIntegrationCoreApi) { + final _$nIHostIntegrationCoreApi = + nIHostIntegrationCoreApi?.reference ?? jni$_.jNullReference; + _set$api( + reference.pointer, + _id_set$api.pointer, + _$nIHostIntegrationCoreApi.pointer, + ).check(); + } + + static final _id_register = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'register', + r'(LNIHostIntegrationCoreApi;Ljava/lang/String;)LNIHostIntegrationCoreApiRegistrar;', + ); + + static final _register = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun register(api: NIHostIntegrationCoreApi, name: kotlin.String): NIHostIntegrationCoreApiRegistrar` + /// The returned object must be released after use, by calling the [release] method. + NIHostIntegrationCoreApiRegistrar register( + NIHostIntegrationCoreApi nIHostIntegrationCoreApi, + jni$_.JString string, + ) { + final _$nIHostIntegrationCoreApi = nIHostIntegrationCoreApi.reference; + final _$string = string.reference; + return _register( + reference.pointer, + _id_register.pointer, + _$nIHostIntegrationCoreApi.pointer, + _$string.pointer, + ).object(); + } + + static final _id_getInstance = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)LNIHostIntegrationCoreApiRegistrar;', + ); + + static final _getInstance = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun getInstance(name: kotlin.String): NIHostIntegrationCoreApiRegistrar?` + /// The returned object must be released after use, by calling the [release] method. + NIHostIntegrationCoreApiRegistrar? getInstance(jni$_.JString string) { + final _$string = string.reference; + return _getInstance( + reference.pointer, + _id_getInstance.pointer, + _$string.pointer, + ).object(); + } + + static final _id_noop = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'noop', r'()V'); + + static final _noop = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun noop(): kotlin.Unit` + void noop() { + _noop(reference.pointer, _id_noop.pointer).check(); + } + + static final _id_echoAllTypes = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoAllTypes', r'(LNIAllTypes;)LNIAllTypes;'); + + static final _echoAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes echoAllTypes(NIAllTypes nIAllTypes) { + final _$nIAllTypes = nIAllTypes.reference; + return _echoAllTypes( + reference.pointer, + _id_echoAllTypes.pointer, + _$nIAllTypes.pointer, + ).object(); + } + + static final _id_throwError = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'throwError', r'()Ljava/lang/Object;'); + + static final _throwError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwError() { + return _throwError( + reference.pointer, + _id_throwError.pointer, + ).object(); + } + + static final _id_throwErrorFromVoid = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'throwErrorFromVoid', r'()V'); + + static final _throwErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwErrorFromVoid(): kotlin.Unit` + void throwErrorFromVoid() { + _throwErrorFromVoid( + reference.pointer, + _id_throwErrorFromVoid.pointer, + ).check(); + } + + static final _id_throwFlutterError = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'throwFlutterError', r'()Ljava/lang/Object;'); + + static final _throwFlutterError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwFlutterError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwFlutterError() { + return _throwFlutterError( + reference.pointer, + _id_throwFlutterError.pointer, + ).object(); + } + + static final _id_echoInt = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoInt', r'(J)J'); + + static final _echoInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoInt(anInt: kotlin.Long): kotlin.Long` + core$_.int echoInt(core$_.int j) { + return _echoInt(reference.pointer, _id_echoInt.pointer, j).long; + } + + static final _id_echoDouble = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoDouble', r'(D)D'); + + static final _echoDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun echoDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double echoDouble(core$_.double d) { + return _echoDouble( + reference.pointer, + _id_echoDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_echoBool = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoBool', r'(Z)Z'); + + static final _echoBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoBool(aBool: kotlin.Boolean): kotlin.Boolean` + core$_.bool echoBool(core$_.bool z) { + return _echoBool( + reference.pointer, + _id_echoBool.pointer, + z ? 1 : 0, + ).boolean; + } + + static final _id_echoString = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoString(jni$_.JString string) { + final _$string = string.reference; + return _echoString( + reference.pointer, + _id_echoString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoUint8List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoUint8List', r'([B)[B'); + + static final _echoUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoUint8List(aUint8List: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray echoUint8List(jni$_.JByteArray bs) { + final _$bs = bs.reference; + return _echoUint8List( + reference.pointer, + _id_echoUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_echoInt32List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoInt32List', r'([I)[I'); + + static final _echoInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoInt32List(aInt32List: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray echoInt32List(jni$_.JIntArray is$) { + final _$is$ = is$.reference; + return _echoInt32List( + reference.pointer, + _id_echoInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_echoInt64List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoInt64List', r'([J)[J'); + + static final _echoInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoInt64List(aInt64List: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray echoInt64List(jni$_.JLongArray js) { + final _$js = js.reference; + return _echoInt64List( + reference.pointer, + _id_echoInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_echoFloat64List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoFloat64List', r'([D)[D'); + + static final _echoFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoFloat64List(aFloat64List: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray echoFloat64List(jni$_.JDoubleArray ds) { + final _$ds = ds.reference; + return _echoFloat64List( + reference.pointer, + _id_echoFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_echoObject = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject echoObject(jni$_.JObject object) { + final _$object = object.reference; + return _echoObject( + reference.pointer, + _id_echoObject.pointer, + _$object.pointer, + ).object(); + } + + static final _id_echoList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoList(jni$_.JList list) { + final _$list = list.reference; + return _echoList( + reference.pointer, + _id_echoList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoStringList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoStringList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoStringList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoStringList(stringList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoStringList(jni$_.JList list) { + final _$list = list.reference; + return _echoStringList( + reference.pointer, + _id_echoStringList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoIntList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoIntList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoIntList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoIntList(intList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoIntList(jni$_.JList list) { + final _$list = list.reference; + return _echoIntList( + reference.pointer, + _id_echoIntList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoDoubleList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoDoubleList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoDoubleList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoDoubleList(doubleList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoDoubleList(jni$_.JList list) { + final _$list = list.reference; + return _echoDoubleList( + reference.pointer, + _id_echoDoubleList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoBoolList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoBoolList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoBoolList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoBoolList(boolList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoBoolList(jni$_.JList list) { + final _$list = list.reference; + return _echoBoolList( + reference.pointer, + _id_echoBoolList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoEnumList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoEnumList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoEnumList(jni$_.JList list) { + final _$list = list.reference; + return _echoEnumList( + reference.pointer, + _id_echoEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoClassList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoClassList( + reference.pointer, + _id_echoClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoNonNullEnumList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullEnumList(jni$_.JList list) { + final _$list = list.reference; + return _echoNonNullEnumList( + reference.pointer, + _id_echoNonNullEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoNonNullClassList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullClassList( + reference.pointer, + _id_echoNonNullClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoMap( + reference.pointer, + _id_echoMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoStringMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoStringMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoStringMap( + reference.pointer, + _id_echoStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoIntMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoIntMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoIntMap( + reference.pointer, + _id_echoIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoEnumMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoEnumMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoEnumMap( + reference.pointer, + _id_echoEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoClassMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoClassMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoClassMap( + reference.pointer, + _id_echoClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullStringMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullStringMap( + reference.pointer, + _id_echoNonNullStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullIntMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullIntMap( + reference.pointer, + _id_echoNonNullIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullEnumMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullEnumMap( + reference.pointer, + _id_echoNonNullEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullClassMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullClassMap( + reference.pointer, + _id_echoNonNullClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoClassWrapper = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoClassWrapper', + r'(LNIAllClassesWrapper;)LNIAllClassesWrapper;', + ); + + static final _echoClassWrapper = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassWrapper(wrapper: NIAllClassesWrapper): NIAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NIAllClassesWrapper echoClassWrapper( + NIAllClassesWrapper nIAllClassesWrapper, + ) { + final _$nIAllClassesWrapper = nIAllClassesWrapper.reference; + return _echoClassWrapper( + reference.pointer, + _id_echoClassWrapper.pointer, + _$nIAllClassesWrapper.pointer, + ).object(); + } + + static final _id_echoEnum = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _echoEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum echoEnum(NIAnEnum nIAnEnum) { + final _$nIAnEnum = nIAnEnum.reference; + return _echoEnum( + reference.pointer, + _id_echoEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherEnum = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAnotherEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _echoAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum echoAnotherEnum(NIAnotherEnum nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum.reference; + return _echoAnotherEnum( + reference.pointer, + _id_echoAnotherEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_echoNamedDefaultString = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNamedDefaultString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedDefaultString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNamedDefaultString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoNamedDefaultString(jni$_.JString string) { + final _$string = string.reference; + return _echoNamedDefaultString( + reference.pointer, + _id_echoNamedDefaultString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoOptionalDefaultDouble = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'echoOptionalDefaultDouble', r'(D)D'); + + static final _echoOptionalDefaultDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun echoOptionalDefaultDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double echoOptionalDefaultDouble(core$_.double d) { + return _echoOptionalDefaultDouble( + reference.pointer, + _id_echoOptionalDefaultDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_echoRequiredInt = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoRequiredInt', r'(J)J'); + + static final _echoRequiredInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoRequiredInt(anInt: kotlin.Long): kotlin.Long` + core$_.int echoRequiredInt(core$_.int j) { + return _echoRequiredInt( + reference.pointer, + _id_echoRequiredInt.pointer, + j, + ).long; + } + + static final _id_echoAllNullableTypes = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAllNullableTypes', + r'(LNIAllNullableTypes;)LNIAllNullableTypes;', + ); + + static final _echoAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? echoAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypes( + reference.pointer, + _id_echoAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + ).object(); + } + + static final _id_echoAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _echoAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_extractNestedNullableString = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'extractNestedNullableString', + r'(LNIAllClassesWrapper;)Ljava/lang/String;', + ); + + static final _extractNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun extractNestedNullableString(wrapper: NIAllClassesWrapper): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? extractNestedNullableString( + NIAllClassesWrapper nIAllClassesWrapper, + ) { + final _$nIAllClassesWrapper = nIAllClassesWrapper.reference; + return _extractNestedNullableString( + reference.pointer, + _id_extractNestedNullableString.pointer, + _$nIAllClassesWrapper.pointer, + ).object(); + } + + static final _id_createNestedNullableString = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'createNestedNullableString', + r'(Ljava/lang/String;)LNIAllClassesWrapper;', + ); + + static final _createNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun createNestedNullableString(nullableString: kotlin.String?): NIAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NIAllClassesWrapper createNestedNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _createNestedNullableString( + reference.pointer, + _id_createNestedNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypes = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypes;', + ); + + static final _sendMultipleNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun sendMultipleNullableTypes(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypes( + reference.pointer, + _id_sendMultipleNullableTypes.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypesWithoutRecursion = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _sendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun sendMultipleNullableTypesWithoutRecursion(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_sendMultipleNullableTypesWithoutRecursion.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoNullableInt = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt(aNullableInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoNullableInt( + reference.pointer, + _id_echoNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_echoNullableDouble = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _echoNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableDouble(aNullableDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? echoNullableDouble(jni$_.JDouble? double) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _echoNullableDouble( + reference.pointer, + _id_echoNullableDouble.pointer, + _$double.pointer, + ).object(); + } + + static final _id_echoNullableBool = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _echoNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableBool(aNullableBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? echoNullableBool(jni$_.JBoolean? boolean) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _echoNullableBool( + reference.pointer, + _id_echoNullableBool.pointer, + _$boolean.pointer, + ).object(); + } + + static final _id_echoNullableString = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableString(aNullableString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNullableString( + reference.pointer, + _id_echoNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoNullableUint8List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'echoNullableUint8List', r'([B)[B'); + + static final _echoNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableUint8List(aNullableUint8List: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? echoNullableUint8List(jni$_.JByteArray? bs) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _echoNullableUint8List( + reference.pointer, + _id_echoNullableUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_echoNullableInt32List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'echoNullableInt32List', r'([I)[I'); + + static final _echoNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt32List(aNullableInt32List: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? echoNullableInt32List(jni$_.JIntArray? is$) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _echoNullableInt32List( + reference.pointer, + _id_echoNullableInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_echoNullableInt64List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'echoNullableInt64List', r'([J)[J'); + + static final _echoNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt64List(aNullableInt64List: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? echoNullableInt64List(jni$_.JLongArray? js) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _echoNullableInt64List( + reference.pointer, + _id_echoNullableInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_echoNullableFloat64List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'echoNullableFloat64List', r'([D)[D'); + + static final _echoNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableFloat64List(aNullableFloat64List: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? echoNullableFloat64List(jni$_.JDoubleArray? ds) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _echoNullableFloat64List( + reference.pointer, + _id_echoNullableFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_echoNullableObject = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableObject(aNullableObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? echoNullableObject(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _echoNullableObject( + reference.pointer, + _id_echoNullableObject.pointer, + _$object.pointer, + ).object(); + } + + static final _id_echoNullableList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableList(aNullableList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableList( + reference.pointer, + _id_echoNullableList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableEnumList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableEnumList(jni$_.JList? list) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableEnumList( + reference.pointer, + _id_echoNullableEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableClassList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableClassList( + reference.pointer, + _id_echoNullableClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumList( + reference.pointer, + _id_echoNullableNonNullEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassList( + reference.pointer, + _id_echoNullableNonNullClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableMap( + reference.pointer, + _id_echoNullableMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableStringMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableStringMap( + reference.pointer, + _id_echoNullableStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableIntMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableIntMap( + reference.pointer, + _id_echoNullableIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableEnumMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableEnumMap( + reference.pointer, + _id_echoNullableEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableClassMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableClassMap( + reference.pointer, + _id_echoNullableClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullStringMap( + reference.pointer, + _id_echoNullableNonNullStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullIntMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullIntMap( + reference.pointer, + _id_echoNullableNonNullIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullEnumMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumMap( + reference.pointer, + _id_echoNullableNonNullEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullClassMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassMap( + reference.pointer, + _id_echoNullableNonNullClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableEnum = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'echoNullableEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _echoNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? echoNullableEnum(NIAnEnum? nIAnEnum) { + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum( + reference.pointer, + _id_echoNullableEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherNullableEnum = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAnotherNullableEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _echoAnotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_echoOptionalNullableInt = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoOptionalNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoOptionalNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoOptionalNullableInt(aNullableInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoOptionalNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoOptionalNullableInt( + reference.pointer, + _id_echoOptionalNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_echoNamedNullableString = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoNamedNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNamedNullableString(aNullableString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNamedNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNamedNullableString( + reference.pointer, + _id_echoNamedNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_noopAsync = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'noopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _noopAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun noopAsync(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future noopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _noopAsync( + reference.pointer, + _id_noopAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_echoAsyncInt = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt(anInt: kotlin.Long): kotlin.Long` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt(core$_.int j) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncInt( + reference.pointer, + _id_echoAsyncInt.pointer, + j, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncDouble = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncDouble(aDouble: kotlin.Double): kotlin.Double` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncDouble(core$_.double d) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncDouble( + reference.pointer, + _id_echoAsyncDouble.pointer, + d, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncBool = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncBool(aBool: kotlin.Boolean): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncBool(core$_.bool z) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncBool( + reference.pointer, + _id_echoAsyncBool.pointer, + z ? 1 : 0, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncString = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncString(jni$_.JString string) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echoAsyncString( + reference.pointer, + _id_echoAsyncString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncUint8List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncUint8List(aUint8List: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _echoAsyncUint8List( + reference.pointer, + _id_echoAsyncUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt32List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt32List(aInt32List: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt32List(jni$_.JIntArray is$) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _echoAsyncInt32List( + reference.pointer, + _id_echoAsyncInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt64List = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt64List(aInt64List: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _echoAsyncInt64List( + reference.pointer, + _id_echoAsyncInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncFloat64List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncFloat64List(aFloat64List: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _echoAsyncFloat64List( + reference.pointer, + _id_echoAsyncFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncObject = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncObject(jni$_.JObject object) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _echoAsyncObject( + reference.pointer, + _id_echoAsyncObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncList( + reference.pointer, + _id_echoAsyncList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncEnumList( + reference.pointer, + _id_echoAsyncEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassList = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncClassList( + reference.pointer, + _id_echoAsyncClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncMap( + reference.pointer, + _id_echoAsyncMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncStringMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncStringMap( + reference.pointer, + _id_echoAsyncStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncIntMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncIntMap( + reference.pointer, + _id_echoAsyncIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncEnumMap( + reference.pointer, + _id_echoAsyncEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + echoAsyncClassMap(jni$_.JMap map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncClassMap( + reference.pointer, + _id_echoAsyncClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnum = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum(NIAnEnum nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncEnum = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAnotherAsyncEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_throwAsyncError = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'throwAsyncError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwAsyncError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncError( + reference.pointer, + _id_throwAsyncError.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_throwAsyncErrorFromVoid = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'throwAsyncErrorFromVoid', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwAsyncErrorFromVoid(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncErrorFromVoid() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncErrorFromVoid( + reference.pointer, + _id_throwAsyncErrorFromVoid.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_throwAsyncFlutterError = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'throwAsyncFlutterError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncFlutterError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwAsyncFlutterError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncFlutterError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncFlutterError( + reference.pointer, + _id_throwAsyncFlutterError.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNIAllTypes = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNIAllTypes', + r'(LNIAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNIAllTypes(NIAllTypes nIAllTypes) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllTypes = nIAllTypes.reference; + final $r = _echoAsyncNIAllTypes( + reference.pointer, + _id_echoAsyncNIAllTypes.pointer, + _$nIAllTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAllTypes.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableNIAllNullableTypes = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableNIAllNullableTypes', + r'(LNIAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNIAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNIAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableNIAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt(jni$_.JLong? long) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt( + reference.pointer, + _id_echoAsyncNullableInt.pointer, + _$long.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableDouble = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableDouble( + reference.pointer, + _id_echoAsyncNullableDouble.pointer, + _$double.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableBool = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableBool( + reference.pointer, + _id_echoAsyncNullableBool.pointer, + _$boolean.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableString = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableString( + reference.pointer, + _id_echoAsyncNullableString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableUint8List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableUint8List(aUint8List: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableUint8List( + reference.pointer, + _id_echoAsyncNullableUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt32List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt32List(aInt32List: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt32List( + reference.pointer, + _id_echoAsyncNullableInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt64List(aInt64List: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt64List( + reference.pointer, + _id_echoAsyncNullableInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableFloat64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableFloat64List(aFloat64List: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableFloat64List( + reference.pointer, + _id_echoAsyncNullableFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableObject = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableObject(anObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableObject( + reference.pointer, + _id_echoAsyncNullableObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNullableList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableList( + reference.pointer, + _id_echoAsyncNullableList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumList( + reference.pointer, + _id_echoAsyncNullableEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassList( + reference.pointer, + _id_echoAsyncNullableClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableMap(jni$_.JMap? map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableMap( + reference.pointer, + _id_echoAsyncNullableMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableStringMap( + reference.pointer, + _id_echoAsyncNullableStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableIntMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableIntMap(jni$_.JMap? map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableIntMap( + reference.pointer, + _id_echoAsyncNullableIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumMap( + reference.pointer, + _id_echoAsyncNullableEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassMap( + reference.pointer, + _id_echoAsyncNullableClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnum = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNullableEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum(NIAnEnum? nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncNullableEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterNoop = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'callFlutterNoop', r'()V'); + + static final _callFlutterNoop = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun callFlutterNoop(): kotlin.Unit` + void callFlutterNoop() { + _callFlutterNoop(reference.pointer, _id_callFlutterNoop.pointer).check(); + } + + static final _id_callFlutterThrowError = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterThrowError', r'()Ljava/lang/Object;'); + + static final _callFlutterThrowError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun callFlutterThrowError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? callFlutterThrowError() { + return _callFlutterThrowError( + reference.pointer, + _id_callFlutterThrowError.pointer, + ).object(); + } + + static final _id_callFlutterThrowErrorFromVoid = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterThrowErrorFromVoid', + r'()V', + ); + + static final _callFlutterThrowErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun callFlutterThrowErrorFromVoid(): kotlin.Unit` + void callFlutterThrowErrorFromVoid() { + _callFlutterThrowErrorFromVoid( + reference.pointer, + _id_callFlutterThrowErrorFromVoid.pointer, + ).check(); + } + + static final _id_callFlutterEchoNIAllTypes = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoNIAllTypes', + r'(LNIAllTypes;)LNIAllTypes;', + ); + + static final _callFlutterEchoNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes callFlutterEchoNIAllTypes(NIAllTypes nIAllTypes) { + final _$nIAllTypes = nIAllTypes.reference; + return _callFlutterEchoNIAllTypes( + reference.pointer, + _id_callFlutterEchoNIAllTypes.pointer, + _$nIAllTypes.pointer, + ).object(); + } + + static final _id_callFlutterEchoNIAllNullableTypes = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNIAllNullableTypes', + r'(LNIAllNullableTypes;)LNIAllNullableTypes;', + ); + + static final _callFlutterEchoNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? callFlutterEchoNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNIAllNullableTypes( + reference.pointer, + _id_callFlutterEchoNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypes = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypes;', + ); + + static final _callFlutterSendMultipleNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterSendMultipleNullableTypes(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes callFlutterSendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _callFlutterSendMultipleNullableTypes( + reference.pointer, + _id_callFlutterSendMultipleNullableTypes.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoNIAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _callFlutterEchoNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? + callFlutterEchoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoNIAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypesWithoutRecursion = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _callFlutterSendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterSendMultipleNullableTypesWithoutRecursion(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion + callFlutterSendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _callFlutterSendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterSendMultipleNullableTypesWithoutRecursion.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoBool = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterEchoBool', r'(Z)Z'); + + static final _callFlutterEchoBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun callFlutterEchoBool(aBool: kotlin.Boolean): kotlin.Boolean` + core$_.bool callFlutterEchoBool(core$_.bool z) { + return _callFlutterEchoBool( + reference.pointer, + _id_callFlutterEchoBool.pointer, + z ? 1 : 0, + ).boolean; + } + + static final _id_callFlutterEchoInt = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'callFlutterEchoInt', r'(J)J'); + + static final _callFlutterEchoInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun callFlutterEchoInt(anInt: kotlin.Long): kotlin.Long` + core$_.int callFlutterEchoInt(core$_.int j) { + return _callFlutterEchoInt( + reference.pointer, + _id_callFlutterEchoInt.pointer, + j, + ).long; + } + + static final _id_callFlutterEchoDouble = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterEchoDouble', r'(D)D'); + + static final _callFlutterEchoDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun callFlutterEchoDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double callFlutterEchoDouble(core$_.double d) { + return _callFlutterEchoDouble( + reference.pointer, + _id_callFlutterEchoDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_callFlutterEchoString = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _callFlutterEchoString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString callFlutterEchoString(jni$_.JString string) { + final _$string = string.reference; + return _callFlutterEchoString( + reference.pointer, + _id_callFlutterEchoString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoUint8List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterEchoUint8List', r'([B)[B'); + + static final _callFlutterEchoUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoUint8List(list: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray callFlutterEchoUint8List(jni$_.JByteArray bs) { + final _$bs = bs.reference; + return _callFlutterEchoUint8List( + reference.pointer, + _id_callFlutterEchoUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_callFlutterEchoInt32List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterEchoInt32List', r'([I)[I'); + + static final _callFlutterEchoInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoInt32List(list: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray callFlutterEchoInt32List(jni$_.JIntArray is$) { + final _$is$ = is$.reference; + return _callFlutterEchoInt32List( + reference.pointer, + _id_callFlutterEchoInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_callFlutterEchoInt64List = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterEchoInt64List', r'([J)[J'); + + static final _callFlutterEchoInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoInt64List(list: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray callFlutterEchoInt64List(jni$_.JLongArray js) { + final _$js = js.reference; + return _callFlutterEchoInt64List( + reference.pointer, + _id_callFlutterEchoInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_callFlutterEchoFloat64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoFloat64List', + r'([D)[D', + ); + + static final _callFlutterEchoFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoFloat64List(list: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray callFlutterEchoFloat64List(jni$_.JDoubleArray ds) { + final _$ds = ds.reference; + return _callFlutterEchoFloat64List( + reference.pointer, + _id_callFlutterEchoFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_callFlutterEchoList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoList( + reference.pointer, + _id_callFlutterEchoList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoEnumList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoEnumList(jni$_.JList list) { + final _$list = list.reference; + return _callFlutterEchoEnumList( + reference.pointer, + _id_callFlutterEchoEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoClassList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoClassList( + reference.pointer, + _id_callFlutterEchoClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoNonNullEnumList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoNonNullEnumList( + reference.pointer, + _id_callFlutterEchoNonNullEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList callFlutterEchoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _callFlutterEchoNonNullClassList( + reference.pointer, + _id_callFlutterEchoNonNullClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_callFlutterEchoMap = NIHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'callFlutterEchoMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoMap( + reference.pointer, + _id_callFlutterEchoMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoStringMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoStringMap( + reference.pointer, + _id_callFlutterEchoStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoIntMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoIntMap( + reference.pointer, + _id_callFlutterEchoIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoEnumMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoEnumMap( + reference.pointer, + _id_callFlutterEchoEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoClassMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoClassMap( + reference.pointer, + _id_callFlutterEchoClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullStringMap( + reference.pointer, + _id_callFlutterEchoNonNullStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullIntMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullIntMap( + reference.pointer, + _id_callFlutterEchoNonNullIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullEnumMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullEnumMap( + reference.pointer, + _id_callFlutterEchoNonNullEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoNonNullClassMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNonNullClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap callFlutterEchoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _callFlutterEchoNonNullClassMap( + reference.pointer, + _id_callFlutterEchoNonNullClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_callFlutterEchoEnum = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'callFlutterEchoEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _callFlutterEchoEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum callFlutterEchoEnum(NIAnEnum nIAnEnum) { + final _$nIAnEnum = nIAnEnum.reference; + return _callFlutterEchoEnum( + reference.pointer, + _id_callFlutterEchoEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNIAnotherEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNIAnotherEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _callFlutterEchoNIAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum callFlutterEchoNIAnotherEnum(NIAnotherEnum nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum.reference; + return _callFlutterEchoNIAnotherEnum( + reference.pointer, + _id_callFlutterEchoNIAnotherEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableBool = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _callFlutterEchoNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? callFlutterEchoNullableBool(jni$_.JBoolean? boolean) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableBool( + reference.pointer, + _id_callFlutterEchoNullableBool.pointer, + _$boolean.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableInt = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _callFlutterEchoNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? callFlutterEchoNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableInt( + reference.pointer, + _id_callFlutterEchoNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableDouble = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _callFlutterEchoNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? callFlutterEchoNullableDouble(jni$_.JDouble? double) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableDouble( + reference.pointer, + _id_callFlutterEchoNullableDouble.pointer, + _$double.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableString = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _callFlutterEchoNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? callFlutterEchoNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableString( + reference.pointer, + _id_callFlutterEchoNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableUint8List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableUint8List', + r'([B)[B', + ); + + static final _callFlutterEchoNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableUint8List(list: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? callFlutterEchoNullableUint8List(jni$_.JByteArray? bs) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableUint8List( + reference.pointer, + _id_callFlutterEchoNullableUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableInt32List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableInt32List', + r'([I)[I', + ); + + static final _callFlutterEchoNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableInt32List(list: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? callFlutterEchoNullableInt32List(jni$_.JIntArray? is$) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableInt32List( + reference.pointer, + _id_callFlutterEchoNullableInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableInt64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableInt64List', + r'([J)[J', + ); + + static final _callFlutterEchoNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableInt64List(list: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? callFlutterEchoNullableInt64List(jni$_.JLongArray? js) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableInt64List( + reference.pointer, + _id_callFlutterEchoNullableInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableFloat64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableFloat64List', + r'([D)[D', + ); + + static final _callFlutterEchoNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableFloat64List(list: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? callFlutterEchoNullableFloat64List( + jni$_.JDoubleArray? ds, + ) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableFloat64List( + reference.pointer, + _id_callFlutterEchoNullableFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableList( + reference.pointer, + _id_callFlutterEchoNullableList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnumList( + reference.pointer, + _id_callFlutterEchoNullableEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableClassList( + reference.pointer, + _id_callFlutterEchoNullableClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullEnumList( + reference.pointer, + _id_callFlutterEchoNullableNonNullEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _callFlutterEchoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? callFlutterEchoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullClassList( + reference.pointer, + _id_callFlutterEchoNullableNonNullClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableMap( + reference.pointer, + _id_callFlutterEchoNullableMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableStringMap( + reference.pointer, + _id_callFlutterEchoNullableStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableIntMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableIntMap( + reference.pointer, + _id_callFlutterEchoNullableIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableEnumMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnumMap( + reference.pointer, + _id_callFlutterEchoNullableEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableClassMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + callFlutterEchoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableClassMap( + reference.pointer, + _id_callFlutterEchoNullableClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + callFlutterEchoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullStringMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullIntMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullIntMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullEnumMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? callFlutterEchoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullEnumMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableNonNullClassMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _callFlutterEchoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableNonNullClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + callFlutterEchoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableNonNullClassMap( + reference.pointer, + _id_callFlutterEchoNullableNonNullClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_callFlutterEchoNullableEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNullableEnum', + r'(LNIAnEnum;)LNIAnEnum;', + ); + + static final _callFlutterEchoNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? callFlutterEchoNullableEnum(NIAnEnum? nIAnEnum) { + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnum( + reference.pointer, + _id_callFlutterEchoNullableEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoAnotherNullableEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAnotherNullableEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _callFlutterEchoAnotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? callFlutterEchoAnotherNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) { + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoAnotherNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherNullableEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterNoopAsync = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterNoopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterNoopAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterNoopAsync(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterNoopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterNoopAsync( + reference.pointer, + _id_callFlutterNoopAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_callFlutterEchoAsyncNIAllTypes = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNIAllTypes', + r'(LNIAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNIAllTypes( + NIAllTypes nIAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllTypes = nIAllTypes.reference; + final $r = _callFlutterEchoAsyncNIAllTypes( + reference.pointer, + _id_callFlutterEchoAsyncNIAllTypes.pointer, + _$nIAllTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAllTypes.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableNIAllNullableTypes = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNIAllNullableTypes', + r'(LNIAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNIAllNullableTypes( + reference.pointer, + _id_callFlutterEchoAsyncNullableNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion + .pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncBool = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncBool(aBool: kotlin.Boolean): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncBool(core$_.bool z) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterEchoAsyncBool( + reference.pointer, + _id_callFlutterEchoAsyncBool.pointer, + z ? 1 : 0, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncInt = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncInt(anInt: kotlin.Long): kotlin.Long` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncInt(core$_.int j) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterEchoAsyncInt( + reference.pointer, + _id_callFlutterEchoAsyncInt.pointer, + j, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncDouble = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncDouble(aDouble: kotlin.Double): kotlin.Double` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncDouble( + core$_.double d, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterEchoAsyncDouble( + reference.pointer, + _id_callFlutterEchoAsyncDouble.pointer, + d, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncString = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncString( + jni$_.JString string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _callFlutterEchoAsyncString( + reference.pointer, + _id_callFlutterEchoAsyncString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncUint8List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncUint8List(list: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _callFlutterEchoAsyncUint8List( + reference.pointer, + _id_callFlutterEchoAsyncUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncInt32List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncInt32List(list: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncInt32List( + jni$_.JIntArray is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _callFlutterEchoAsyncInt32List( + reference.pointer, + _id_callFlutterEchoAsyncInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncInt64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncInt64List(list: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _callFlutterEchoAsyncInt64List( + reference.pointer, + _id_callFlutterEchoAsyncInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncFloat64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncFloat64List(list: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _callFlutterEchoAsyncFloat64List( + reference.pointer, + _id_callFlutterEchoAsyncFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncObject = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncObject( + jni$_.JObject object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _callFlutterEchoAsyncObject( + reference.pointer, + _id_callFlutterEchoAsyncObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncList = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncList( + reference.pointer, + _id_callFlutterEchoAsyncList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncEnumList( + reference.pointer, + _id_callFlutterEchoAsyncEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncClassList( + reference.pointer, + _id_callFlutterEchoAsyncClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNonNullEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNonNullEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncNonNullEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncNonNullEnumList( + reference.pointer, + _id_callFlutterEchoAsyncNonNullEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNonNullClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNonNullClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncNonNullClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _callFlutterEchoAsyncNonNullClassList( + reference.pointer, + _id_callFlutterEchoAsyncNonNullClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncMap = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncMap( + reference.pointer, + _id_callFlutterEchoAsyncMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncStringMap( + reference.pointer, + _id_callFlutterEchoAsyncStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncIntMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncIntMap(jni$_.JMap map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncIntMap( + reference.pointer, + _id_callFlutterEchoAsyncIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncEnumMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> callFlutterEchoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncEnumMap( + reference.pointer, + _id_callFlutterEchoAsyncEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncClassMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + callFlutterEchoAsyncClassMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _callFlutterEchoAsyncClassMap( + reference.pointer, + _id_callFlutterEchoAsyncClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncEnum = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAsyncEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncEnum(NIAnEnum nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum.reference; + final $r = _callFlutterEchoAsyncEnum( + reference.pointer, + _id_callFlutterEchoAsyncEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAnotherAsyncEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAnotherAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum.reference; + final $r = _callFlutterEchoAnotherAsyncEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableBool = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableBool( + reference.pointer, + _id_callFlutterEchoAsyncNullableBool.pointer, + _$boolean.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableInt = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableInt( + jni$_.JLong? long, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableInt( + reference.pointer, + _id_callFlutterEchoAsyncNullableInt.pointer, + _$long.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableDouble = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableDouble( + reference.pointer, + _id_callFlutterEchoAsyncNullableDouble.pointer, + _$double.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableString = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableString( + reference.pointer, + _id_callFlutterEchoAsyncNullableString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableUint8List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableUint8List(list: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableUint8List( + reference.pointer, + _id_callFlutterEchoAsyncNullableUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableInt32List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableInt32List(list: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableInt32List( + reference.pointer, + _id_callFlutterEchoAsyncNullableInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableInt64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableInt64List(list: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableInt64List( + reference.pointer, + _id_callFlutterEchoAsyncNullableInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableFloat64List = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableFloat64List(list: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableFloat64List( + reference.pointer, + _id_callFlutterEchoAsyncNullableFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_callFlutterThrowFlutterErrorAsync = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterThrowFlutterErrorAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterThrowFlutterErrorAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterThrowFlutterErrorAsync(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterThrowFlutterErrorAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterThrowFlutterErrorAsync( + reference.pointer, + _id_callFlutterThrowFlutterErrorAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableObject = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableObject(anObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableObject( + reference.pointer, + _id_callFlutterEchoAsyncNullableObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> callFlutterEchoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableList( + reference.pointer, + _id_callFlutterEchoAsyncNullableList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> callFlutterEchoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnumList( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableClassList( + reference.pointer, + _id_callFlutterEchoAsyncNullableClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNonNullEnumList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNonNullEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableNonNullEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNonNullEnumList( + reference.pointer, + _id_callFlutterEchoAsyncNullableNonNullEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNonNullClassList = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNonNullClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableNonNullClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNonNullClassList( + reference.pointer, + _id_callFlutterEchoAsyncNullableNonNullClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableStringMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableStringMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableIntMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableIntMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableIntMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableEnumMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnumMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableClassMap = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + callFlutterEchoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableClassMap( + reference.pointer, + _id_callFlutterEchoAsyncNullableClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableEnum( + NIAnEnum? nIAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncNullableEnum = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAnotherAsyncNullableEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterEchoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAnotherAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncNullableEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_defaultIsMainThread = NIHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'defaultIsMainThread', r'()Z'); + + static final _defaultIsMainThread = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun defaultIsMainThread(): kotlin.Boolean` + core$_.bool defaultIsMainThread() { + return _defaultIsMainThread( + reference.pointer, + _id_defaultIsMainThread.pointer, + ).boolean; + } + + static final _id_callFlutterNoopOnBackgroundThread = + NIHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterNoopOnBackgroundThread', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterNoopOnBackgroundThread = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun callFlutterNoopOnBackgroundThread(): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterNoopOnBackgroundThread() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _callFlutterNoopOnBackgroundThread( + reference.pointer, + _id_callFlutterNoopOnBackgroundThread.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } +} + +final class $NIHostIntegrationCoreApiRegistrar$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIHostIntegrationCoreApiRegistrar$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIHostIntegrationCoreApiRegistrar;'; +} + +/// from: `NIFlutterIntegrationCoreApi` +extension type NIFlutterIntegrationCoreApi._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIFlutterIntegrationCoreApi'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIFlutterIntegrationCoreApi$Type$(); + + /// Maps a specific port to the implemented interface. + static final core$_.Map _$impls = + {}; + static jni$_.JObjectPtr _$invoke( + core$_.int port, + jni$_.JObjectPtr descriptor, + jni$_.JObjectPtr args, + ) { + return _$invokeMethod( + port, + jni$_.MethodInvocation.fromAddresses(0, descriptor.address, args.address), + ); + } + + static final jni$_.Pointer< + jni$_.NativeFunction< + jni$_.JObjectPtr Function(jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr) + > + > + _$invokePointer = jni$_.Pointer.fromFunction(_$invoke); + + static jni$_.Pointer _$invokeMethod( + core$_.int $p, + jni$_.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'noop()V') { + _$impls[$p]!.noop(); + return jni$_.nullptr; + } + if ($d == r'throwFlutterError()Ljava/lang/Object;') { + final $r = _$impls[$p]!.throwFlutterError(); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'throwError()Ljava/lang/Object;') { + final $r = _$impls[$p]!.throwError(); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'throwErrorFromVoid()V') { + _$impls[$p]!.throwErrorFromVoid(); + return jni$_.nullptr; + } + if ($d == r'echoNIAllTypes(LNIAllTypes;)LNIAllTypes;') { + final $r = _$impls[$p]!.echoNIAllTypes(($a![0] as NIAllTypes)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNIAllNullableTypes(LNIAllNullableTypes;)LNIAllNullableTypes;') { + final $r = _$impls[$p]!.echoNIAllNullableTypes( + ($a![0] as NIAllNullableTypes?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'sendMultipleNullableTypes(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypes;') { + final $r = _$impls[$p]!.sendMultipleNullableTypes( + ($a![0] as jni$_.JBoolean?), + ($a![1] as jni$_.JLong?), + ($a![2] as jni$_.JString?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNIAllNullableTypesWithoutRecursion(LNIAllNullableTypesWithoutRecursion;)LNIAllNullableTypesWithoutRecursion;') { + final $r = _$impls[$p]!.echoNIAllNullableTypesWithoutRecursion( + ($a![0] as NIAllNullableTypesWithoutRecursion?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'sendMultipleNullableTypesWithoutRecursion(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypesWithoutRecursion;') { + final $r = _$impls[$p]!.sendMultipleNullableTypesWithoutRecursion( + ($a![0] as jni$_.JBoolean?), + ($a![1] as jni$_.JLong?), + ($a![2] as jni$_.JString?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoBool(Z)Z') { + final $r = _$impls[$p]!.echoBool( + ($a![0] as jni$_.JBoolean).toDartBool(releaseOriginal: true), + ); + return $r.toJBoolean().reference.toPointer(); + } + if ($d == r'echoInt(J)J') { + final $r = _$impls[$p]!.echoInt( + ($a![0] as jni$_.JLong).toDartInt(releaseOriginal: true), + ); + return $r.toJLong().reference.toPointer(); + } + if ($d == r'echoDouble(D)D') { + final $r = _$impls[$p]!.echoDouble( + ($a![0] as jni$_.JDouble).toDartDouble(releaseOriginal: true), + ); + return $r.toJDouble().reference.toPointer(); + } + if ($d == r'echoString(Ljava/lang/String;)Ljava/lang/String;') { + final $r = _$impls[$p]!.echoString(($a![0] as jni$_.JString)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoUint8List([B)[B') { + final $r = _$impls[$p]!.echoUint8List(($a![0] as jni$_.JByteArray)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoInt32List([I)[I') { + final $r = _$impls[$p]!.echoInt32List(($a![0] as jni$_.JIntArray)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoInt64List([J)[J') { + final $r = _$impls[$p]!.echoInt64List(($a![0] as jni$_.JLongArray)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoFloat64List([D)[D') { + final $r = _$impls[$p]!.echoFloat64List(($a![0] as jni$_.JDoubleArray)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoList( + ($a![0] as jni$_.JList), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoEnumList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoEnumList( + ($a![0] as jni$_.JList), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoClassList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoClassList( + ($a![0] as jni$_.JList), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNonNullEnumList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNonNullEnumList( + ($a![0] as jni$_.JList), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNonNullClassList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNonNullClassList( + ($a![0] as jni$_.JList), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoStringMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoStringMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoIntMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoIntMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoEnumMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoEnumMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoClassMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoClassMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNonNullStringMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNonNullStringMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNonNullIntMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNonNullIntMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNonNullEnumMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNonNullEnumMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNonNullClassMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNonNullClassMap( + ($a![0] as jni$_.JMap), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoEnum(LNIAnEnum;)LNIAnEnum;') { + final $r = _$impls[$p]!.echoEnum(($a![0] as NIAnEnum)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNIAnotherEnum(LNIAnotherEnum;)LNIAnotherEnum;') { + final $r = _$impls[$p]!.echoNIAnotherEnum(($a![0] as NIAnotherEnum)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableBool(Ljava/lang/Boolean;)Ljava/lang/Boolean;') { + final $r = _$impls[$p]!.echoNullableBool(($a![0] as jni$_.JBoolean?)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableInt(Ljava/lang/Long;)Ljava/lang/Long;') { + final $r = _$impls[$p]!.echoNullableInt(($a![0] as jni$_.JLong?)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableDouble(Ljava/lang/Double;)Ljava/lang/Double;') { + final $r = _$impls[$p]!.echoNullableDouble(($a![0] as jni$_.JDouble?)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableString(Ljava/lang/String;)Ljava/lang/String;') { + final $r = _$impls[$p]!.echoNullableString(($a![0] as jni$_.JString?)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableUint8List([B)[B') { + final $r = _$impls[$p]!.echoNullableUint8List( + ($a![0] as jni$_.JByteArray?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableInt32List([I)[I') { + final $r = _$impls[$p]!.echoNullableInt32List( + ($a![0] as jni$_.JIntArray?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableInt64List([J)[J') { + final $r = _$impls[$p]!.echoNullableInt64List( + ($a![0] as jni$_.JLongArray?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableFloat64List([D)[D') { + final $r = _$impls[$p]!.echoNullableFloat64List( + ($a![0] as jni$_.JDoubleArray?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNullableList( + ($a![0] as jni$_.JList?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableEnumList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNullableEnumList( + ($a![0] as jni$_.JList?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableClassList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNullableClassList( + ($a![0] as jni$_.JList?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNullableNonNullEnumList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNullableNonNullEnumList( + ($a![0] as jni$_.JList?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNullableNonNullClassList(Ljava/util/List;)Ljava/util/List;') { + final $r = _$impls[$p]!.echoNullableNonNullClassList( + ($a![0] as jni$_.JList?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableStringMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableStringMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableIntMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableIntMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableEnumMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableEnumMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableClassMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableClassMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNullableNonNullStringMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableNonNullStringMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableNonNullIntMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableNonNullIntMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableNonNullEnumMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableNonNullEnumMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNullableNonNullClassMap(Ljava/util/Map;)Ljava/util/Map;') { + final $r = _$impls[$p]!.echoNullableNonNullClassMap( + ($a![0] as jni$_.JMap?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoNullableEnum(LNIAnEnum;)LNIAnEnum;') { + final $r = _$impls[$p]!.echoNullableEnum(($a![0] as NIAnEnum?)); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == r'echoAnotherNullableEnum(LNIAnotherEnum;)LNIAnotherEnum;') { + final $r = _$impls[$p]!.echoAnotherNullableEnum( + ($a![0] as NIAnotherEnum?), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'noopAsync(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference( + ($a![0] as jni$_.JObject).reference, + ).resumeWithVoidFuture(_$impls[$p]!.noopAsync()); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'throwFlutterErrorAsync(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference( + ($a![0] as jni$_.JObject).reference, + ).resumeWithFuture(_$impls[$p]!.throwFlutterErrorAsync()); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNIAllTypes(LNIAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNIAllTypes(($a![0] as NIAllTypes)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableNIAllNullableTypes(LNIAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableNIAllNullableTypes( + ($a![0] as NIAllNullableTypes?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableNIAllNullableTypesWithoutRecursion(LNIAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableNIAllNullableTypesWithoutRecursion( + ($a![0] as NIAllNullableTypesWithoutRecursion?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncBool(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncBool( + ($a![0] as jni$_.JBoolean).toDartBool(releaseOriginal: true), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncInt(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncInt( + ($a![0] as jni$_.JLong).toDartInt(releaseOriginal: true), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncDouble(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncDouble( + ($a![0] as jni$_.JDouble).toDartDouble(releaseOriginal: true), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncString(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncString(($a![0] as jni$_.JString)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncUint8List([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncUint8List(($a![0] as jni$_.JByteArray)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncInt32List([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncInt32List(($a![0] as jni$_.JIntArray)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncInt64List([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncInt64List(($a![0] as jni$_.JLongArray)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncFloat64List([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncFloat64List(($a![0] as jni$_.JDoubleArray)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncObject(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncObject(($a![0] as jni$_.JObject)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncList( + ($a![0] as jni$_.JList), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncEnumList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncEnumList( + ($a![0] as jni$_.JList), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncClassList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncClassList( + ($a![0] as jni$_.JList), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNonNullEnumList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNonNullEnumList( + ($a![0] as jni$_.JList), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNonNullClassList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNonNullClassList( + ($a![0] as jni$_.JList), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncMap( + ($a![0] as jni$_.JMap), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncStringMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncStringMap( + ($a![0] as jni$_.JMap), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncIntMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncIntMap( + ($a![0] as jni$_.JMap), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncEnumMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncEnumMap( + ($a![0] as jni$_.JMap), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncClassMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncClassMap( + ($a![0] as jni$_.JMap), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncEnum(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture(_$impls[$p]!.echoAsyncEnum(($a![0] as NIAnEnum))); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAnotherAsyncEnum(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAnotherAsyncEnum(($a![0] as NIAnotherEnum)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableBool(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableBool(($a![0] as jni$_.JBoolean?)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableInt(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableInt(($a![0] as jni$_.JLong?)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableDouble(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableDouble(($a![0] as jni$_.JDouble?)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableString(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableString(($a![0] as jni$_.JString?)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableUint8List([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableUint8List( + ($a![0] as jni$_.JByteArray?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableInt32List([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableInt32List( + ($a![0] as jni$_.JIntArray?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableInt64List([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableInt64List( + ($a![0] as jni$_.JLongArray?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableFloat64List([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableFloat64List( + ($a![0] as jni$_.JDoubleArray?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableObject(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableObject(($a![0] as jni$_.JObject?)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableList( + ($a![0] as jni$_.JList?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableEnumList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableEnumList( + ($a![0] as jni$_.JList?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableClassList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableClassList( + ($a![0] as jni$_.JList?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableNonNullEnumList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableNonNullEnumList( + ($a![0] as jni$_.JList?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableNonNullClassList(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableNonNullClassList( + ($a![0] as jni$_.JList?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableMap( + ($a![0] as jni$_.JMap?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableStringMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableStringMap( + ($a![0] as jni$_.JMap?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableIntMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableIntMap( + ($a![0] as jni$_.JMap?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableEnumMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableEnumMap( + ($a![0] as jni$_.JMap?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableClassMap(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableClassMap( + ($a![0] as jni$_.JMap?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableEnum(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAsyncNullableEnum(($a![0] as NIAnEnum?)), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAnotherAsyncNullableEnum(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = + jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture( + _$impls[$p]!.echoAnotherAsyncNullableEnum( + ($a![0] as NIAnotherEnum?), + ), + ); + return ($r as jni$_.JObject?) + ?.as(const jni$_.$JObject$Type$()) + .reference + .toPointer() ?? + jni$_.nullptr; + } + } catch (e) { + return jni$_.ProtectedJniExtensions.newDartException(e); + } + return jni$_.nullptr; + } + + static void implementIn( + jni$_.JImplementer implementer, + $NIFlutterIntegrationCoreApi $impl, + ) { + late final jni$_.RawReceivePort $p; + $p = jni$_.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = jni$_.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + jni$_.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add(r'NIFlutterIntegrationCoreApi', $p, _$invokePointer, [ + if ($impl.noop$async) r'noop()V', + if ($impl.throwErrorFromVoid$async) r'throwErrorFromVoid()V', + ]); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory NIFlutterIntegrationCoreApi.implement( + $NIFlutterIntegrationCoreApi $impl, + ) { + final $i = jni$_.JImplementer(); + implementIn($i, $impl); + return $i.implement(); + } +} + +extension NIFlutterIntegrationCoreApi$$Methods on NIFlutterIntegrationCoreApi { + static final _id_noop = NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'noop', + r'()V', + ); + + static final _noop = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun noop(): kotlin.Unit` + void noop() { + _noop(reference.pointer, _id_noop.pointer).check(); + } + + static final _id_throwFlutterError = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'throwFlutterError', r'()Ljava/lang/Object;'); + + static final _throwFlutterError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwFlutterError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwFlutterError() { + return _throwFlutterError( + reference.pointer, + _id_throwFlutterError.pointer, + ).object(); + } + + static final _id_throwError = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'throwError', r'()Ljava/lang/Object;'); + + static final _throwError = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwError(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwError() { + return _throwError( + reference.pointer, + _id_throwError.pointer, + ).object(); + } + + static final _id_throwErrorFromVoid = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'throwErrorFromVoid', r'()V'); + + static final _throwErrorFromVoid = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun throwErrorFromVoid(): kotlin.Unit` + void throwErrorFromVoid() { + _throwErrorFromVoid( + reference.pointer, + _id_throwErrorFromVoid.pointer, + ).check(); + } + + static final _id_echoNIAllTypes = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoNIAllTypes', r'(LNIAllTypes;)LNIAllTypes;'); + + static final _echoNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes echoNIAllTypes(NIAllTypes nIAllTypes) { + final _$nIAllTypes = nIAllTypes.reference; + return _echoNIAllTypes( + reference.pointer, + _id_echoNIAllTypes.pointer, + _$nIAllTypes.pointer, + ).object(); + } + + static final _id_echoNIAllNullableTypes = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNIAllNullableTypes', + r'(LNIAllNullableTypes;)LNIAllNullableTypes;', + ); + + static final _echoNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? echoNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoNIAllNullableTypes( + reference.pointer, + _id_echoNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypes = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypes;', + ); + + static final _sendMultipleNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun sendMultipleNullableTypes(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypes( + reference.pointer, + _id_sendMultipleNullableTypes.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoNIAllNullableTypesWithoutRecursion = + NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _echoNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoNIAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypesWithoutRecursion = + NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _sendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun sendMultipleNullableTypesWithoutRecursion(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableString: kotlin.String?): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_sendMultipleNullableTypesWithoutRecursion.pointer, + _$boolean.pointer, + _$long.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoBool = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoBool', r'(Z)Z'); + + static final _echoBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoBool(aBool: kotlin.Boolean): kotlin.Boolean` + core$_.bool echoBool(core$_.bool z) { + return _echoBool( + reference.pointer, + _id_echoBool.pointer, + z ? 1 : 0, + ).boolean; + } + + static final _id_echoInt = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoInt', r'(J)J'); + + static final _echoInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun echoInt(anInt: kotlin.Long): kotlin.Long` + core$_.int echoInt(core$_.int j) { + return _echoInt(reference.pointer, _id_echoInt.pointer, j).long; + } + + static final _id_echoDouble = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoDouble', r'(D)D'); + + static final _echoDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double,)>, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + ) + >(); + + /// from: `public fun echoDouble(aDouble: kotlin.Double): kotlin.Double` + core$_.double echoDouble(core$_.double d) { + return _echoDouble( + reference.pointer, + _id_echoDouble.pointer, + d, + ).doubleFloat; + } + + static final _id_echoString = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoString(jni$_.JString string) { + final _$string = string.reference; + return _echoString( + reference.pointer, + _id_echoString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoUint8List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoUint8List', r'([B)[B'); + + static final _echoUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoUint8List(list: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray echoUint8List(jni$_.JByteArray bs) { + final _$bs = bs.reference; + return _echoUint8List( + reference.pointer, + _id_echoUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_echoInt32List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoInt32List', r'([I)[I'); + + static final _echoInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoInt32List(list: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray echoInt32List(jni$_.JIntArray is$) { + final _$is$ = is$.reference; + return _echoInt32List( + reference.pointer, + _id_echoInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_echoInt64List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoInt64List', r'([J)[J'); + + static final _echoInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoInt64List(list: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray echoInt64List(jni$_.JLongArray js) { + final _$js = js.reference; + return _echoInt64List( + reference.pointer, + _id_echoInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_echoFloat64List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoFloat64List', r'([D)[D'); + + static final _echoFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoFloat64List(list: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray echoFloat64List(jni$_.JDoubleArray ds) { + final _$ds = ds.reference; + return _echoFloat64List( + reference.pointer, + _id_echoFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_echoList = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoList(jni$_.JList list) { + final _$list = list.reference; + return _echoList( + reference.pointer, + _id_echoList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoEnumList = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoEnumList', r'(Ljava/util/List;)Ljava/util/List;'); + + static final _echoEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoEnumList(jni$_.JList list) { + final _$list = list.reference; + return _echoEnumList( + reference.pointer, + _id_echoEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoClassList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoClassList( + reference.pointer, + _id_echoClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoNonNullEnumList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullEnumList(jni$_.JList list) { + final _$list = list.reference; + return _echoNonNullEnumList( + reference.pointer, + _id_echoNonNullEnumList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoNonNullClassList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullClassList( + reference.pointer, + _id_echoNonNullClassList.pointer, + _$list.pointer, + ).object>(); + } + + static final _id_echoMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoMap( + reference.pointer, + _id_echoMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoStringMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoStringMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoStringMap( + reference.pointer, + _id_echoStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoIntMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoIntMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoIntMap( + reference.pointer, + _id_echoIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoEnumMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoEnumMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoEnumMap( + reference.pointer, + _id_echoEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoClassMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoClassMap', r'(Ljava/util/Map;)Ljava/util/Map;'); + + static final _echoClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoClassMap( + reference.pointer, + _id_echoClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullStringMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullStringMap( + reference.pointer, + _id_echoNonNullStringMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullIntMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullIntMap( + reference.pointer, + _id_echoNonNullIntMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullEnumMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullEnumMap( + reference.pointer, + _id_echoNonNullEnumMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoNonNullClassMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNonNullClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullClassMap( + reference.pointer, + _id_echoNonNullClassMap.pointer, + _$map.pointer, + ).object>(); + } + + static final _id_echoEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _echoEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum echoEnum(NIAnEnum nIAnEnum) { + final _$nIAnEnum = nIAnEnum.reference; + return _echoEnum( + reference.pointer, + _id_echoEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_echoNIAnotherEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNIAnotherEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _echoNIAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum echoNIAnotherEnum(NIAnotherEnum nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum.reference; + return _echoNIAnotherEnum( + reference.pointer, + _id_echoNIAnotherEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_echoNullableBool = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _echoNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? echoNullableBool(jni$_.JBoolean? boolean) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _echoNullableBool( + reference.pointer, + _id_echoNullableBool.pointer, + _$boolean.pointer, + ).object(); + } + + static final _id_echoNullableInt = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoNullableInt(jni$_.JLong? long) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoNullableInt( + reference.pointer, + _id_echoNullableInt.pointer, + _$long.pointer, + ).object(); + } + + static final _id_echoNullableDouble = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _echoNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? echoNullableDouble(jni$_.JDouble? double) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _echoNullableDouble( + reference.pointer, + _id_echoNullableDouble.pointer, + _$double.pointer, + ).object(); + } + + static final _id_echoNullableString = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNullableString( + reference.pointer, + _id_echoNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_echoNullableUint8List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoNullableUint8List', r'([B)[B'); + + static final _echoNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableUint8List(list: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? echoNullableUint8List(jni$_.JByteArray? bs) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _echoNullableUint8List( + reference.pointer, + _id_echoNullableUint8List.pointer, + _$bs.pointer, + ).object(); + } + + static final _id_echoNullableInt32List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoNullableInt32List', r'([I)[I'); + + static final _echoNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt32List(list: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? echoNullableInt32List(jni$_.JIntArray? is$) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _echoNullableInt32List( + reference.pointer, + _id_echoNullableInt32List.pointer, + _$is$.pointer, + ).object(); + } + + static final _id_echoNullableInt64List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoNullableInt64List', r'([J)[J'); + + static final _echoNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableInt64List(list: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? echoNullableInt64List(jni$_.JLongArray? js) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _echoNullableInt64List( + reference.pointer, + _id_echoNullableInt64List.pointer, + _$js.pointer, + ).object(); + } + + static final _id_echoNullableFloat64List = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoNullableFloat64List', r'([D)[D'); + + static final _echoNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableFloat64List(list: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? echoNullableFloat64List(jni$_.JDoubleArray? ds) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _echoNullableFloat64List( + reference.pointer, + _id_echoNullableFloat64List.pointer, + _$ds.pointer, + ).object(); + } + + static final _id_echoNullableList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableList( + reference.pointer, + _id_echoNullableList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableEnumList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableEnumList(jni$_.JList? list) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableEnumList( + reference.pointer, + _id_echoNullableEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableClassList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableClassList( + reference.pointer, + _id_echoNullableClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullEnumList = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumList( + reference.pointer, + _id_echoNullableNonNullEnumList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullClassList = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassList( + reference.pointer, + _id_echoNullableNonNullClassList.pointer, + _$list.pointer, + ).object?>(); + } + + static final _id_echoNullableMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableMap( + reference.pointer, + _id_echoNullableMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableStringMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableStringMap( + reference.pointer, + _id_echoNullableStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableIntMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableIntMap( + reference.pointer, + _id_echoNullableIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableEnumMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableEnumMap( + reference.pointer, + _id_echoNullableEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableClassMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableClassMap( + reference.pointer, + _id_echoNullableClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullStringMap = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullStringMap( + reference.pointer, + _id_echoNullableNonNullStringMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullIntMap = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullIntMap( + reference.pointer, + _id_echoNullableNonNullIntMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullEnumMap = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumMap( + reference.pointer, + _id_echoNullableNonNullEnumMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableNonNullClassMap = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableNonNullClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassMap( + reference.pointer, + _id_echoNullableNonNullClassMap.pointer, + _$map.pointer, + ).object?>(); + } + + static final _id_echoNullableEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId(r'echoNullableEnum', r'(LNIAnEnum;)LNIAnEnum;'); + + static final _echoNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? echoNullableEnum(NIAnEnum? nIAnEnum) { + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum( + reference.pointer, + _id_echoNullableEnum.pointer, + _$nIAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherNullableEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherNullableEnum', + r'(LNIAnotherEnum;)LNIAnotherEnum;', + ); + + static final _echoAnotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? nIAnotherEnum) { + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum.pointer, + _$nIAnotherEnum.pointer, + ).object(); + } + + static final _id_noopAsync = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'noopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _noopAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun noopAsync(): kotlin.Unit` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future noopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _noopAsync( + reference.pointer, + _id_noopAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return; + } + + static final _id_throwFlutterErrorAsync = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'throwFlutterErrorAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwFlutterErrorAsync = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun throwFlutterErrorAsync(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwFlutterErrorAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwFlutterErrorAsync( + reference.pointer, + _id_throwFlutterErrorAsync.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNIAllTypes = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNIAllTypes', + r'(LNIAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNIAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNIAllTypes(NIAllTypes nIAllTypes) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllTypes = nIAllTypes.reference; + final $r = _echoAsyncNIAllTypes( + reference.pointer, + _id_echoAsyncNIAllTypes.pointer, + _$nIAllTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAllTypes.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableNIAllNullableTypes = + NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNIAllNullableTypes', + r'(LNIAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNIAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNIAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableNIAllNullableTypes.pointer, + _$nIAllNullableTypes.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNIAllNullableTypesWithoutRecursion = + NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNIAllNullableTypesWithoutRecursion', + r'(LNIAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNIAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNIAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableNIAllNullableTypesWithoutRecursion.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + NIAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncBool = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncBool(aBool: kotlin.Boolean): kotlin.Boolean` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncBool(core$_.bool z) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncBool( + reference.pointer, + _id_echoAsyncBool.pointer, + z ? 1 : 0, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt(anInt: kotlin.Long): kotlin.Long` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt(core$_.int j) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncInt( + reference.pointer, + _id_echoAsyncInt.pointer, + j, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncDouble = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Double, jni$_.Pointer)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.double, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncDouble(aDouble: kotlin.Double): kotlin.Double` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncDouble(core$_.double d) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncDouble( + reference.pointer, + _id_echoAsyncDouble.pointer, + d, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncString = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncString(aString: kotlin.String): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncString(jni$_.JString string) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echoAsyncString( + reference.pointer, + _id_echoAsyncString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncUint8List = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncUint8List(list: kotlin.ByteArray): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _echoAsyncUint8List( + reference.pointer, + _id_echoAsyncUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt32List = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt32List(list: kotlin.IntArray): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt32List(jni$_.JIntArray is$) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _echoAsyncInt32List( + reference.pointer, + _id_echoAsyncInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt64List = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncInt64List(list: kotlin.LongArray): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _echoAsyncInt64List( + reference.pointer, + _id_echoAsyncInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncFloat64List = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncFloat64List(list: kotlin.DoubleArray): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _echoAsyncFloat64List( + reference.pointer, + _id_echoAsyncFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncObject = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncObject(anObject: kotlin.Any): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncObject(jni$_.JObject object) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _echoAsyncObject( + reference.pointer, + _id_echoAsyncObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncList(list: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncList( + reference.pointer, + _id_echoAsyncList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncEnumList( + reference.pointer, + _id_echoAsyncEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncClassList( + reference.pointer, + _id_echoAsyncClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNonNullEnumList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNonNullEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNonNullEnumList(enumList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncNonNullEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncNonNullEnumList( + reference.pointer, + _id_echoAsyncNonNullEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNonNullClassList = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNonNullClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNonNullClassList(classList: kotlin.collections.List): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncNonNullClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncNonNullClassList( + reference.pointer, + _id_echoAsyncNonNullClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncMap(map: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncMap( + reference.pointer, + _id_echoAsyncMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncStringMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncStringMap(stringMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncStringMap( + reference.pointer, + _id_echoAsyncStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncIntMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncIntMap(intMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncIntMap( + reference.pointer, + _id_echoAsyncIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnumMap(enumMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncEnumMap( + reference.pointer, + _id_echoAsyncEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncClassMap(classMap: kotlin.collections.Map): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + echoAsyncClassMap(jni$_.JMap map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncClassMap( + reference.pointer, + _id_echoAsyncClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum(NIAnEnum nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherAsyncEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as(NIAnotherEnum.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableBool = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableBool(aBool: kotlin.Boolean?): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableBool( + reference.pointer, + _id_echoAsyncNullableBool.pointer, + _$boolean.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JBoolean.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt(anInt: kotlin.Long?): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt(jni$_.JLong? long) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt( + reference.pointer, + _id_echoAsyncNullableInt.pointer, + _$long.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLong.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableDouble = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableDouble(aDouble: kotlin.Double?): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableDouble( + reference.pointer, + _id_echoAsyncNullableDouble.pointer, + _$double.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDouble.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableString = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableString(aString: kotlin.String?): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableString( + reference.pointer, + _id_echoAsyncNullableString.pointer, + _$string.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JString.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableUint8List = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableUint8List(list: kotlin.ByteArray?): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableUint8List( + reference.pointer, + _id_echoAsyncNullableUint8List.pointer, + _$bs.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JByteArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt32List = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt32List(list: kotlin.IntArray?): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt32List( + reference.pointer, + _id_echoAsyncNullableInt32List.pointer, + _$is$.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JIntArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt64List = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableInt64List(list: kotlin.LongArray?): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt64List( + reference.pointer, + _id_echoAsyncNullableInt64List.pointer, + _$js.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JLongArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableFloat64List = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableFloat64List(list: kotlin.DoubleArray?): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableFloat64List( + reference.pointer, + _id_echoAsyncNullableFloat64List.pointer, + _$ds.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + jni$_.JDoubleArray.type as jni$_.JType, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableObject = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableObject(anObject: kotlin.Any?): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableObject( + reference.pointer, + _id_echoAsyncNullableObject.pointer, + _$object.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNullableList = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableList(list: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableList( + reference.pointer, + _id_echoAsyncNullableList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumList = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumList( + reference.pointer, + _id_echoAsyncNullableEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassList = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassList( + reference.pointer, + _id_echoAsyncNullableClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNonNullEnumList = + NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNonNullEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNonNullEnumList(enumList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableNonNullEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNonNullEnumList( + reference.pointer, + _id_echoAsyncNullableNonNullEnumList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNonNullClassList = + NIFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNonNullClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableNonNullClassList(classList: kotlin.collections.List?): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableNonNullClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNonNullClassList( + reference.pointer, + _id_echoAsyncNullableNonNullClassList.pointer, + _$list.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JList.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableMap(map: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableMap(jni$_.JMap? map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableMap( + reference.pointer, + _id_echoAsyncNullableMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableStringMap = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableStringMap(stringMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableStringMap( + reference.pointer, + _id_echoAsyncNullableStringMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableIntMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableIntMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableIntMap(intMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableIntMap(jni$_.JMap? map) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableIntMap( + reference.pointer, + _id_echoAsyncNullableIntMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumMap = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnumMap(enumMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumMap( + reference.pointer, + _id_echoAsyncNullableEnumMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassMap = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableClassMap(classMap: kotlin.collections.Map?): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassMap( + reference.pointer, + _id_echoAsyncNullableClassMap.pointer, + _$map.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as>( + jni$_.JMap.type + as jni$_.JType>, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnum = NIFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableEnum', + r'(LNIAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum(NIAnEnum? nIAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum.pointer, + _$nIAnEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncNullableEnum = NIFlutterIntegrationCoreApi + ._class + .instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(LNIAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum.pointer, + _$nIAnotherEnum.pointer, + _$continuation.pointer, + ).object(); + _$continuation.release(); + jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a)), + ); + if ($o != null && $o.isInstanceOf(jni$_.result$Class)) { + $o = jni$_.resultValueField.get($o, const jni$_.$JObject$Type$()); + } else if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = jni$_.failureExceptionField.get( + $o, + const jni$_.$JObject$Type$(), + ); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as(NIAnotherEnum.type, releaseOriginal: true); + } +} + +abstract base mixin class $NIFlutterIntegrationCoreApi { + factory $NIFlutterIntegrationCoreApi({ + required void Function() noop, + core$_.bool noop$async, + required jni$_.JObject? Function() throwFlutterError, + required jni$_.JObject? Function() throwError, + required void Function() throwErrorFromVoid, + core$_.bool throwErrorFromVoid$async, + required NIAllTypes Function(NIAllTypes nIAllTypes) echoNIAllTypes, + required NIAllNullableTypes? Function( + NIAllNullableTypes? nIAllNullableTypes, + ) + echoNIAllNullableTypes, + required NIAllNullableTypes Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + sendMultipleNullableTypes, + required NIAllNullableTypesWithoutRecursion? Function( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) + echoNIAllNullableTypesWithoutRecursion, + required NIAllNullableTypesWithoutRecursion Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + sendMultipleNullableTypesWithoutRecursion, + required core$_.bool Function(core$_.bool z) echoBool, + required core$_.int Function(core$_.int j) echoInt, + required core$_.double Function(core$_.double d) echoDouble, + required jni$_.JString Function(jni$_.JString string) echoString, + required jni$_.JByteArray Function(jni$_.JByteArray bs) echoUint8List, + required jni$_.JIntArray Function(jni$_.JIntArray is$) echoInt32List, + required jni$_.JLongArray Function(jni$_.JLongArray js) echoInt64List, + required jni$_.JDoubleArray Function(jni$_.JDoubleArray ds) echoFloat64List, + required jni$_.JList Function( + jni$_.JList list, + ) + echoList, + required jni$_.JList Function(jni$_.JList list) + echoEnumList, + required jni$_.JList Function( + jni$_.JList list, + ) + echoClassList, + required jni$_.JList Function(jni$_.JList list) + echoNonNullEnumList, + required jni$_.JList Function( + jni$_.JList list, + ) + echoNonNullClassList, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoStringMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoIntMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoEnumMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoClassMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullStringMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullIntMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullEnumMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullClassMap, + required NIAnEnum Function(NIAnEnum nIAnEnum) echoEnum, + required NIAnotherEnum Function(NIAnotherEnum nIAnotherEnum) + echoNIAnotherEnum, + required jni$_.JBoolean? Function(jni$_.JBoolean? boolean) echoNullableBool, + required jni$_.JLong? Function(jni$_.JLong? long) echoNullableInt, + required jni$_.JDouble? Function(jni$_.JDouble? double) echoNullableDouble, + required jni$_.JString? Function(jni$_.JString? string) echoNullableString, + required jni$_.JByteArray? Function(jni$_.JByteArray? bs) + echoNullableUint8List, + required jni$_.JIntArray? Function(jni$_.JIntArray? is$) + echoNullableInt32List, + required jni$_.JLongArray? Function(jni$_.JLongArray? js) + echoNullableInt64List, + required jni$_.JDoubleArray? Function(jni$_.JDoubleArray? ds) + echoNullableFloat64List, + required jni$_.JList? Function( + jni$_.JList? list, + ) + echoNullableList, + required jni$_.JList? Function(jni$_.JList? list) + echoNullableEnumList, + required jni$_.JList? Function( + jni$_.JList? list, + ) + echoNullableClassList, + required jni$_.JList? Function(jni$_.JList? list) + echoNullableNonNullEnumList, + required jni$_.JList? Function( + jni$_.JList? list, + ) + echoNullableNonNullClassList, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableStringMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableIntMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableEnumMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableClassMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullStringMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullIntMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullEnumMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullClassMap, + required NIAnEnum? Function(NIAnEnum? nIAnEnum) echoNullableEnum, + required NIAnotherEnum? Function(NIAnotherEnum? nIAnotherEnum) + echoAnotherNullableEnum, + required core$_.Future Function() noopAsync, + required core$_.Future Function() throwFlutterErrorAsync, + required core$_.Future Function(NIAllTypes nIAllTypes) + echoAsyncNIAllTypes, + required core$_.Future Function( + NIAllNullableTypes? nIAllNullableTypes, + ) + echoAsyncNullableNIAllNullableTypes, + required core$_.Future Function( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursion, + required core$_.Future Function(core$_.bool z) + echoAsyncBool, + required core$_.Future Function(core$_.int j) echoAsyncInt, + required core$_.Future Function(core$_.double d) + echoAsyncDouble, + required core$_.Future Function(jni$_.JString string) + echoAsyncString, + required core$_.Future Function(jni$_.JByteArray bs) + echoAsyncUint8List, + required core$_.Future Function(jni$_.JIntArray is$) + echoAsyncInt32List, + required core$_.Future Function(jni$_.JLongArray js) + echoAsyncInt64List, + required core$_.Future Function(jni$_.JDoubleArray ds) + echoAsyncFloat64List, + required core$_.Future Function(jni$_.JObject object) + echoAsyncObject, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncEnumList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncClassList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncNonNullEnumList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncNonNullClassList, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncMap, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncStringMap, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncIntMap, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncEnumMap, + required core$_.Future> + Function(jni$_.JMap map) + echoAsyncClassMap, + required core$_.Future Function(NIAnEnum nIAnEnum) echoAsyncEnum, + required core$_.Future Function(NIAnotherEnum nIAnotherEnum) + echoAnotherAsyncEnum, + required core$_.Future Function(jni$_.JBoolean? boolean) + echoAsyncNullableBool, + required core$_.Future Function(jni$_.JLong? long) + echoAsyncNullableInt, + required core$_.Future Function(jni$_.JDouble? double) + echoAsyncNullableDouble, + required core$_.Future Function(jni$_.JString? string) + echoAsyncNullableString, + required core$_.Future Function(jni$_.JByteArray? bs) + echoAsyncNullableUint8List, + required core$_.Future Function(jni$_.JIntArray? is$) + echoAsyncNullableInt32List, + required core$_.Future Function(jni$_.JLongArray? js) + echoAsyncNullableInt64List, + required core$_.Future Function(jni$_.JDoubleArray? ds) + echoAsyncNullableFloat64List, + required core$_.Future Function(jni$_.JObject? object) + echoAsyncNullableObject, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableEnumList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableClassList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableNonNullEnumList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableNonNullClassList, + required core$_.Future?> + Function(jni$_.JMap? map) + echoAsyncNullableMap, + required core$_.Future?> + Function(jni$_.JMap? map) + echoAsyncNullableStringMap, + required core$_.Future?> Function( + jni$_.JMap? map, + ) + echoAsyncNullableIntMap, + required core$_.Future?> Function( + jni$_.JMap? map, + ) + echoAsyncNullableEnumMap, + required core$_.Future?> + Function(jni$_.JMap? map) + echoAsyncNullableClassMap, + required core$_.Future Function(NIAnEnum? nIAnEnum) + echoAsyncNullableEnum, + required core$_.Future Function( + NIAnotherEnum? nIAnotherEnum, + ) + echoAnotherAsyncNullableEnum, + }) = _$NIFlutterIntegrationCoreApi; + + void noop(); + core$_.bool get noop$async => false; + jni$_.JObject? throwFlutterError(); + jni$_.JObject? throwError(); + void throwErrorFromVoid(); + core$_.bool get throwErrorFromVoid$async => false; + NIAllTypes echoNIAllTypes(NIAllTypes nIAllTypes); + NIAllNullableTypes? echoNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ); + NIAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ); + NIAllNullableTypesWithoutRecursion? echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ); + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ); + core$_.bool echoBool(core$_.bool z); + core$_.int echoInt(core$_.int j); + core$_.double echoDouble(core$_.double d); + jni$_.JString echoString(jni$_.JString string); + jni$_.JByteArray echoUint8List(jni$_.JByteArray bs); + jni$_.JIntArray echoInt32List(jni$_.JIntArray is$); + jni$_.JLongArray echoInt64List(jni$_.JLongArray js); + jni$_.JDoubleArray echoFloat64List(jni$_.JDoubleArray ds); + jni$_.JList echoList(jni$_.JList list); + jni$_.JList echoEnumList(jni$_.JList list); + jni$_.JList echoClassList( + jni$_.JList list, + ); + jni$_.JList echoNonNullEnumList(jni$_.JList list); + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ); + jni$_.JMap echoMap( + jni$_.JMap map, + ); + jni$_.JMap echoStringMap( + jni$_.JMap map, + ); + jni$_.JMap echoIntMap( + jni$_.JMap map, + ); + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ); + jni$_.JMap echoClassMap( + jni$_.JMap map, + ); + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ); + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ); + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ); + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ); + NIAnEnum echoEnum(NIAnEnum nIAnEnum); + NIAnotherEnum echoNIAnotherEnum(NIAnotherEnum nIAnotherEnum); + jni$_.JBoolean? echoNullableBool(jni$_.JBoolean? boolean); + jni$_.JLong? echoNullableInt(jni$_.JLong? long); + jni$_.JDouble? echoNullableDouble(jni$_.JDouble? double); + jni$_.JString? echoNullableString(jni$_.JString? string); + jni$_.JByteArray? echoNullableUint8List(jni$_.JByteArray? bs); + jni$_.JIntArray? echoNullableInt32List(jni$_.JIntArray? is$); + jni$_.JLongArray? echoNullableInt64List(jni$_.JLongArray? js); + jni$_.JDoubleArray? echoNullableFloat64List(jni$_.JDoubleArray? ds); + jni$_.JList? echoNullableList( + jni$_.JList? list, + ); + jni$_.JList? echoNullableEnumList(jni$_.JList? list); + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ); + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ); + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ); + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ); + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ); + NIAnEnum? echoNullableEnum(NIAnEnum? nIAnEnum); + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? nIAnotherEnum); + core$_.Future noopAsync(); + core$_.Future throwFlutterErrorAsync(); + core$_.Future echoAsyncNIAllTypes(NIAllTypes nIAllTypes); + core$_.Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ); + core$_.Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ); + core$_.Future echoAsyncBool(core$_.bool z); + core$_.Future echoAsyncInt(core$_.int j); + core$_.Future echoAsyncDouble(core$_.double d); + core$_.Future echoAsyncString(jni$_.JString string); + core$_.Future echoAsyncUint8List(jni$_.JByteArray bs); + core$_.Future echoAsyncInt32List(jni$_.JIntArray is$); + core$_.Future echoAsyncInt64List(jni$_.JLongArray js); + core$_.Future echoAsyncFloat64List(jni$_.JDoubleArray ds); + core$_.Future echoAsyncObject(jni$_.JObject object); + core$_.Future> echoAsyncList( + jni$_.JList list, + ); + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ); + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ); + core$_.Future> echoAsyncNonNullEnumList( + jni$_.JList list, + ); + core$_.Future> echoAsyncNonNullClassList( + jni$_.JList list, + ); + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ); + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ); + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ); + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ); + core$_.Future> + echoAsyncClassMap(jni$_.JMap map); + core$_.Future echoAsyncEnum(NIAnEnum nIAnEnum); + core$_.Future echoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ); + core$_.Future echoAsyncNullableBool(jni$_.JBoolean? boolean); + core$_.Future echoAsyncNullableInt(jni$_.JLong? long); + core$_.Future echoAsyncNullableDouble(jni$_.JDouble? double); + core$_.Future echoAsyncNullableString(jni$_.JString? string); + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ); + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ); + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ); + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ); + core$_.Future echoAsyncNullableObject(jni$_.JObject? object); + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ); + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ); + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ); + core$_.Future?> echoAsyncNullableNonNullEnumList( + jni$_.JList? list, + ); + core$_.Future?> + echoAsyncNullableNonNullClassList(jni$_.JList? list); + core$_.Future?> + echoAsyncNullableMap(jni$_.JMap? map); + core$_.Future?> + echoAsyncNullableStringMap(jni$_.JMap? map); + core$_.Future?> + echoAsyncNullableIntMap(jni$_.JMap? map); + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ); + core$_.Future?> + echoAsyncNullableClassMap(jni$_.JMap? map); + core$_.Future echoAsyncNullableEnum(NIAnEnum? nIAnEnum); + core$_.Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ); +} + +final class _$NIFlutterIntegrationCoreApi with $NIFlutterIntegrationCoreApi { + _$NIFlutterIntegrationCoreApi({ + required void Function() noop, + this.noop$async = false, + required jni$_.JObject? Function() throwFlutterError, + required jni$_.JObject? Function() throwError, + required void Function() throwErrorFromVoid, + this.throwErrorFromVoid$async = false, + required NIAllTypes Function(NIAllTypes nIAllTypes) echoNIAllTypes, + required NIAllNullableTypes? Function( + NIAllNullableTypes? nIAllNullableTypes, + ) + echoNIAllNullableTypes, + required NIAllNullableTypes Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + sendMultipleNullableTypes, + required NIAllNullableTypesWithoutRecursion? Function( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) + echoNIAllNullableTypesWithoutRecursion, + required NIAllNullableTypesWithoutRecursion Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + sendMultipleNullableTypesWithoutRecursion, + required core$_.bool Function(core$_.bool z) echoBool, + required core$_.int Function(core$_.int j) echoInt, + required core$_.double Function(core$_.double d) echoDouble, + required jni$_.JString Function(jni$_.JString string) echoString, + required jni$_.JByteArray Function(jni$_.JByteArray bs) echoUint8List, + required jni$_.JIntArray Function(jni$_.JIntArray is$) echoInt32List, + required jni$_.JLongArray Function(jni$_.JLongArray js) echoInt64List, + required jni$_.JDoubleArray Function(jni$_.JDoubleArray ds) echoFloat64List, + required jni$_.JList Function( + jni$_.JList list, + ) + echoList, + required jni$_.JList Function(jni$_.JList list) + echoEnumList, + required jni$_.JList Function( + jni$_.JList list, + ) + echoClassList, + required jni$_.JList Function(jni$_.JList list) + echoNonNullEnumList, + required jni$_.JList Function( + jni$_.JList list, + ) + echoNonNullClassList, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoStringMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoIntMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoEnumMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoClassMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullStringMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullIntMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullEnumMap, + required jni$_.JMap Function( + jni$_.JMap map, + ) + echoNonNullClassMap, + required NIAnEnum Function(NIAnEnum nIAnEnum) echoEnum, + required NIAnotherEnum Function(NIAnotherEnum nIAnotherEnum) + echoNIAnotherEnum, + required jni$_.JBoolean? Function(jni$_.JBoolean? boolean) echoNullableBool, + required jni$_.JLong? Function(jni$_.JLong? long) echoNullableInt, + required jni$_.JDouble? Function(jni$_.JDouble? double) echoNullableDouble, + required jni$_.JString? Function(jni$_.JString? string) echoNullableString, + required jni$_.JByteArray? Function(jni$_.JByteArray? bs) + echoNullableUint8List, + required jni$_.JIntArray? Function(jni$_.JIntArray? is$) + echoNullableInt32List, + required jni$_.JLongArray? Function(jni$_.JLongArray? js) + echoNullableInt64List, + required jni$_.JDoubleArray? Function(jni$_.JDoubleArray? ds) + echoNullableFloat64List, + required jni$_.JList? Function( + jni$_.JList? list, + ) + echoNullableList, + required jni$_.JList? Function(jni$_.JList? list) + echoNullableEnumList, + required jni$_.JList? Function( + jni$_.JList? list, + ) + echoNullableClassList, + required jni$_.JList? Function(jni$_.JList? list) + echoNullableNonNullEnumList, + required jni$_.JList? Function( + jni$_.JList? list, + ) + echoNullableNonNullClassList, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableStringMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableIntMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableEnumMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableClassMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullStringMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullIntMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullEnumMap, + required jni$_.JMap? Function( + jni$_.JMap? map, + ) + echoNullableNonNullClassMap, + required NIAnEnum? Function(NIAnEnum? nIAnEnum) echoNullableEnum, + required NIAnotherEnum? Function(NIAnotherEnum? nIAnotherEnum) + echoAnotherNullableEnum, + required core$_.Future Function() noopAsync, + required core$_.Future Function() throwFlutterErrorAsync, + required core$_.Future Function(NIAllTypes nIAllTypes) + echoAsyncNIAllTypes, + required core$_.Future Function( + NIAllNullableTypes? nIAllNullableTypes, + ) + echoAsyncNullableNIAllNullableTypes, + required core$_.Future Function( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) + echoAsyncNullableNIAllNullableTypesWithoutRecursion, + required core$_.Future Function(core$_.bool z) + echoAsyncBool, + required core$_.Future Function(core$_.int j) echoAsyncInt, + required core$_.Future Function(core$_.double d) + echoAsyncDouble, + required core$_.Future Function(jni$_.JString string) + echoAsyncString, + required core$_.Future Function(jni$_.JByteArray bs) + echoAsyncUint8List, + required core$_.Future Function(jni$_.JIntArray is$) + echoAsyncInt32List, + required core$_.Future Function(jni$_.JLongArray js) + echoAsyncInt64List, + required core$_.Future Function(jni$_.JDoubleArray ds) + echoAsyncFloat64List, + required core$_.Future Function(jni$_.JObject object) + echoAsyncObject, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncEnumList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncClassList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncNonNullEnumList, + required core$_.Future> Function( + jni$_.JList list, + ) + echoAsyncNonNullClassList, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncMap, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncStringMap, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncIntMap, + required core$_.Future> Function( + jni$_.JMap map, + ) + echoAsyncEnumMap, + required core$_.Future> + Function(jni$_.JMap map) + echoAsyncClassMap, + required core$_.Future Function(NIAnEnum nIAnEnum) echoAsyncEnum, + required core$_.Future Function(NIAnotherEnum nIAnotherEnum) + echoAnotherAsyncEnum, + required core$_.Future Function(jni$_.JBoolean? boolean) + echoAsyncNullableBool, + required core$_.Future Function(jni$_.JLong? long) + echoAsyncNullableInt, + required core$_.Future Function(jni$_.JDouble? double) + echoAsyncNullableDouble, + required core$_.Future Function(jni$_.JString? string) + echoAsyncNullableString, + required core$_.Future Function(jni$_.JByteArray? bs) + echoAsyncNullableUint8List, + required core$_.Future Function(jni$_.JIntArray? is$) + echoAsyncNullableInt32List, + required core$_.Future Function(jni$_.JLongArray? js) + echoAsyncNullableInt64List, + required core$_.Future Function(jni$_.JDoubleArray? ds) + echoAsyncNullableFloat64List, + required core$_.Future Function(jni$_.JObject? object) + echoAsyncNullableObject, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableEnumList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableClassList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableNonNullEnumList, + required core$_.Future?> Function( + jni$_.JList? list, + ) + echoAsyncNullableNonNullClassList, + required core$_.Future?> + Function(jni$_.JMap? map) + echoAsyncNullableMap, + required core$_.Future?> + Function(jni$_.JMap? map) + echoAsyncNullableStringMap, + required core$_.Future?> Function( + jni$_.JMap? map, + ) + echoAsyncNullableIntMap, + required core$_.Future?> Function( + jni$_.JMap? map, + ) + echoAsyncNullableEnumMap, + required core$_.Future?> + Function(jni$_.JMap? map) + echoAsyncNullableClassMap, + required core$_.Future Function(NIAnEnum? nIAnEnum) + echoAsyncNullableEnum, + required core$_.Future Function( + NIAnotherEnum? nIAnotherEnum, + ) + echoAnotherAsyncNullableEnum, + }) : _noop = noop, + _throwFlutterError = throwFlutterError, + _throwError = throwError, + _throwErrorFromVoid = throwErrorFromVoid, + _echoNIAllTypes = echoNIAllTypes, + _echoNIAllNullableTypes = echoNIAllNullableTypes, + _sendMultipleNullableTypes = sendMultipleNullableTypes, + _echoNIAllNullableTypesWithoutRecursion = + echoNIAllNullableTypesWithoutRecursion, + _sendMultipleNullableTypesWithoutRecursion = + sendMultipleNullableTypesWithoutRecursion, + _echoBool = echoBool, + _echoInt = echoInt, + _echoDouble = echoDouble, + _echoString = echoString, + _echoUint8List = echoUint8List, + _echoInt32List = echoInt32List, + _echoInt64List = echoInt64List, + _echoFloat64List = echoFloat64List, + _echoList = echoList, + _echoEnumList = echoEnumList, + _echoClassList = echoClassList, + _echoNonNullEnumList = echoNonNullEnumList, + _echoNonNullClassList = echoNonNullClassList, + _echoMap = echoMap, + _echoStringMap = echoStringMap, + _echoIntMap = echoIntMap, + _echoEnumMap = echoEnumMap, + _echoClassMap = echoClassMap, + _echoNonNullStringMap = echoNonNullStringMap, + _echoNonNullIntMap = echoNonNullIntMap, + _echoNonNullEnumMap = echoNonNullEnumMap, + _echoNonNullClassMap = echoNonNullClassMap, + _echoEnum = echoEnum, + _echoNIAnotherEnum = echoNIAnotherEnum, + _echoNullableBool = echoNullableBool, + _echoNullableInt = echoNullableInt, + _echoNullableDouble = echoNullableDouble, + _echoNullableString = echoNullableString, + _echoNullableUint8List = echoNullableUint8List, + _echoNullableInt32List = echoNullableInt32List, + _echoNullableInt64List = echoNullableInt64List, + _echoNullableFloat64List = echoNullableFloat64List, + _echoNullableList = echoNullableList, + _echoNullableEnumList = echoNullableEnumList, + _echoNullableClassList = echoNullableClassList, + _echoNullableNonNullEnumList = echoNullableNonNullEnumList, + _echoNullableNonNullClassList = echoNullableNonNullClassList, + _echoNullableMap = echoNullableMap, + _echoNullableStringMap = echoNullableStringMap, + _echoNullableIntMap = echoNullableIntMap, + _echoNullableEnumMap = echoNullableEnumMap, + _echoNullableClassMap = echoNullableClassMap, + _echoNullableNonNullStringMap = echoNullableNonNullStringMap, + _echoNullableNonNullIntMap = echoNullableNonNullIntMap, + _echoNullableNonNullEnumMap = echoNullableNonNullEnumMap, + _echoNullableNonNullClassMap = echoNullableNonNullClassMap, + _echoNullableEnum = echoNullableEnum, + _echoAnotherNullableEnum = echoAnotherNullableEnum, + _noopAsync = noopAsync, + _throwFlutterErrorAsync = throwFlutterErrorAsync, + _echoAsyncNIAllTypes = echoAsyncNIAllTypes, + _echoAsyncNullableNIAllNullableTypes = + echoAsyncNullableNIAllNullableTypes, + _echoAsyncNullableNIAllNullableTypesWithoutRecursion = + echoAsyncNullableNIAllNullableTypesWithoutRecursion, + _echoAsyncBool = echoAsyncBool, + _echoAsyncInt = echoAsyncInt, + _echoAsyncDouble = echoAsyncDouble, + _echoAsyncString = echoAsyncString, + _echoAsyncUint8List = echoAsyncUint8List, + _echoAsyncInt32List = echoAsyncInt32List, + _echoAsyncInt64List = echoAsyncInt64List, + _echoAsyncFloat64List = echoAsyncFloat64List, + _echoAsyncObject = echoAsyncObject, + _echoAsyncList = echoAsyncList, + _echoAsyncEnumList = echoAsyncEnumList, + _echoAsyncClassList = echoAsyncClassList, + _echoAsyncNonNullEnumList = echoAsyncNonNullEnumList, + _echoAsyncNonNullClassList = echoAsyncNonNullClassList, + _echoAsyncMap = echoAsyncMap, + _echoAsyncStringMap = echoAsyncStringMap, + _echoAsyncIntMap = echoAsyncIntMap, + _echoAsyncEnumMap = echoAsyncEnumMap, + _echoAsyncClassMap = echoAsyncClassMap, + _echoAsyncEnum = echoAsyncEnum, + _echoAnotherAsyncEnum = echoAnotherAsyncEnum, + _echoAsyncNullableBool = echoAsyncNullableBool, + _echoAsyncNullableInt = echoAsyncNullableInt, + _echoAsyncNullableDouble = echoAsyncNullableDouble, + _echoAsyncNullableString = echoAsyncNullableString, + _echoAsyncNullableUint8List = echoAsyncNullableUint8List, + _echoAsyncNullableInt32List = echoAsyncNullableInt32List, + _echoAsyncNullableInt64List = echoAsyncNullableInt64List, + _echoAsyncNullableFloat64List = echoAsyncNullableFloat64List, + _echoAsyncNullableObject = echoAsyncNullableObject, + _echoAsyncNullableList = echoAsyncNullableList, + _echoAsyncNullableEnumList = echoAsyncNullableEnumList, + _echoAsyncNullableClassList = echoAsyncNullableClassList, + _echoAsyncNullableNonNullEnumList = echoAsyncNullableNonNullEnumList, + _echoAsyncNullableNonNullClassList = echoAsyncNullableNonNullClassList, + _echoAsyncNullableMap = echoAsyncNullableMap, + _echoAsyncNullableStringMap = echoAsyncNullableStringMap, + _echoAsyncNullableIntMap = echoAsyncNullableIntMap, + _echoAsyncNullableEnumMap = echoAsyncNullableEnumMap, + _echoAsyncNullableClassMap = echoAsyncNullableClassMap, + _echoAsyncNullableEnum = echoAsyncNullableEnum, + _echoAnotherAsyncNullableEnum = echoAnotherAsyncNullableEnum; + + final void Function() _noop; + final core$_.bool noop$async; + final jni$_.JObject? Function() _throwFlutterError; + final jni$_.JObject? Function() _throwError; + final void Function() _throwErrorFromVoid; + final core$_.bool throwErrorFromVoid$async; + final NIAllTypes Function(NIAllTypes nIAllTypes) _echoNIAllTypes; + final NIAllNullableTypes? Function(NIAllNullableTypes? nIAllNullableTypes) + _echoNIAllNullableTypes; + final NIAllNullableTypes Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + _sendMultipleNullableTypes; + final NIAllNullableTypesWithoutRecursion? Function( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) + _echoNIAllNullableTypesWithoutRecursion; + final NIAllNullableTypesWithoutRecursion Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + _sendMultipleNullableTypesWithoutRecursion; + final core$_.bool Function(core$_.bool z) _echoBool; + final core$_.int Function(core$_.int j) _echoInt; + final core$_.double Function(core$_.double d) _echoDouble; + final jni$_.JString Function(jni$_.JString string) _echoString; + final jni$_.JByteArray Function(jni$_.JByteArray bs) _echoUint8List; + final jni$_.JIntArray Function(jni$_.JIntArray is$) _echoInt32List; + final jni$_.JLongArray Function(jni$_.JLongArray js) _echoInt64List; + final jni$_.JDoubleArray Function(jni$_.JDoubleArray ds) _echoFloat64List; + final jni$_.JList Function(jni$_.JList list) + _echoList; + final jni$_.JList Function(jni$_.JList list) + _echoEnumList; + final jni$_.JList Function( + jni$_.JList list, + ) + _echoClassList; + final jni$_.JList Function(jni$_.JList list) + _echoNonNullEnumList; + final jni$_.JList Function( + jni$_.JList list, + ) + _echoNonNullClassList; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoStringMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoIntMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoEnumMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoClassMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoNonNullStringMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoNonNullIntMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoNonNullEnumMap; + final jni$_.JMap Function( + jni$_.JMap map, + ) + _echoNonNullClassMap; + final NIAnEnum Function(NIAnEnum nIAnEnum) _echoEnum; + final NIAnotherEnum Function(NIAnotherEnum nIAnotherEnum) _echoNIAnotherEnum; + final jni$_.JBoolean? Function(jni$_.JBoolean? boolean) _echoNullableBool; + final jni$_.JLong? Function(jni$_.JLong? long) _echoNullableInt; + final jni$_.JDouble? Function(jni$_.JDouble? double) _echoNullableDouble; + final jni$_.JString? Function(jni$_.JString? string) _echoNullableString; + final jni$_.JByteArray? Function(jni$_.JByteArray? bs) _echoNullableUint8List; + final jni$_.JIntArray? Function(jni$_.JIntArray? is$) _echoNullableInt32List; + final jni$_.JLongArray? Function(jni$_.JLongArray? js) _echoNullableInt64List; + final jni$_.JDoubleArray? Function(jni$_.JDoubleArray? ds) + _echoNullableFloat64List; + final jni$_.JList? Function(jni$_.JList? list) + _echoNullableList; + final jni$_.JList? Function(jni$_.JList? list) + _echoNullableEnumList; + final jni$_.JList? Function( + jni$_.JList? list, + ) + _echoNullableClassList; + final jni$_.JList? Function(jni$_.JList? list) + _echoNullableNonNullEnumList; + final jni$_.JList? Function( + jni$_.JList? list, + ) + _echoNullableNonNullClassList; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableStringMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableIntMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableEnumMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableClassMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableNonNullStringMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableNonNullIntMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableNonNullEnumMap; + final jni$_.JMap? Function( + jni$_.JMap? map, + ) + _echoNullableNonNullClassMap; + final NIAnEnum? Function(NIAnEnum? nIAnEnum) _echoNullableEnum; + final NIAnotherEnum? Function(NIAnotherEnum? nIAnotherEnum) + _echoAnotherNullableEnum; + final core$_.Future Function() _noopAsync; + final core$_.Future Function() _throwFlutterErrorAsync; + final core$_.Future Function(NIAllTypes nIAllTypes) + _echoAsyncNIAllTypes; + final core$_.Future Function( + NIAllNullableTypes? nIAllNullableTypes, + ) + _echoAsyncNullableNIAllNullableTypes; + final core$_.Future Function( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) + _echoAsyncNullableNIAllNullableTypesWithoutRecursion; + final core$_.Future Function(core$_.bool z) _echoAsyncBool; + final core$_.Future Function(core$_.int j) _echoAsyncInt; + final core$_.Future Function(core$_.double d) _echoAsyncDouble; + final core$_.Future Function(jni$_.JString string) + _echoAsyncString; + final core$_.Future Function(jni$_.JByteArray bs) + _echoAsyncUint8List; + final core$_.Future Function(jni$_.JIntArray is$) + _echoAsyncInt32List; + final core$_.Future Function(jni$_.JLongArray js) + _echoAsyncInt64List; + final core$_.Future Function(jni$_.JDoubleArray ds) + _echoAsyncFloat64List; + final core$_.Future Function(jni$_.JObject object) + _echoAsyncObject; + final core$_.Future> Function( + jni$_.JList list, + ) + _echoAsyncList; + final core$_.Future> Function( + jni$_.JList list, + ) + _echoAsyncEnumList; + final core$_.Future> Function( + jni$_.JList list, + ) + _echoAsyncClassList; + final core$_.Future> Function( + jni$_.JList list, + ) + _echoAsyncNonNullEnumList; + final core$_.Future> Function( + jni$_.JList list, + ) + _echoAsyncNonNullClassList; + final core$_.Future> Function( + jni$_.JMap map, + ) + _echoAsyncMap; + final core$_.Future> Function( + jni$_.JMap map, + ) + _echoAsyncStringMap; + final core$_.Future> Function( + jni$_.JMap map, + ) + _echoAsyncIntMap; + final core$_.Future> Function( + jni$_.JMap map, + ) + _echoAsyncEnumMap; + final core$_.Future> Function( + jni$_.JMap map, + ) + _echoAsyncClassMap; + final core$_.Future Function(NIAnEnum nIAnEnum) _echoAsyncEnum; + final core$_.Future Function(NIAnotherEnum nIAnotherEnum) + _echoAnotherAsyncEnum; + final core$_.Future Function(jni$_.JBoolean? boolean) + _echoAsyncNullableBool; + final core$_.Future Function(jni$_.JLong? long) + _echoAsyncNullableInt; + final core$_.Future Function(jni$_.JDouble? double) + _echoAsyncNullableDouble; + final core$_.Future Function(jni$_.JString? string) + _echoAsyncNullableString; + final core$_.Future Function(jni$_.JByteArray? bs) + _echoAsyncNullableUint8List; + final core$_.Future Function(jni$_.JIntArray? is$) + _echoAsyncNullableInt32List; + final core$_.Future Function(jni$_.JLongArray? js) + _echoAsyncNullableInt64List; + final core$_.Future Function(jni$_.JDoubleArray? ds) + _echoAsyncNullableFloat64List; + final core$_.Future Function(jni$_.JObject? object) + _echoAsyncNullableObject; + final core$_.Future?> Function( + jni$_.JList? list, + ) + _echoAsyncNullableList; + final core$_.Future?> Function( + jni$_.JList? list, + ) + _echoAsyncNullableEnumList; + final core$_.Future?> Function( + jni$_.JList? list, + ) + _echoAsyncNullableClassList; + final core$_.Future?> Function( + jni$_.JList? list, + ) + _echoAsyncNullableNonNullEnumList; + final core$_.Future?> Function( + jni$_.JList? list, + ) + _echoAsyncNullableNonNullClassList; + final core$_.Future?> Function( + jni$_.JMap? map, + ) + _echoAsyncNullableMap; + final core$_.Future?> Function( + jni$_.JMap? map, + ) + _echoAsyncNullableStringMap; + final core$_.Future?> Function( + jni$_.JMap? map, + ) + _echoAsyncNullableIntMap; + final core$_.Future?> Function( + jni$_.JMap? map, + ) + _echoAsyncNullableEnumMap; + final core$_.Future?> Function( + jni$_.JMap? map, + ) + _echoAsyncNullableClassMap; + final core$_.Future Function(NIAnEnum? nIAnEnum) + _echoAsyncNullableEnum; + final core$_.Future Function(NIAnotherEnum? nIAnotherEnum) + _echoAnotherAsyncNullableEnum; + + void noop() { + return _noop(); + } + + jni$_.JObject? throwFlutterError() { + return _throwFlutterError(); + } + + jni$_.JObject? throwError() { + return _throwError(); + } + + void throwErrorFromVoid() { + return _throwErrorFromVoid(); + } + + NIAllTypes echoNIAllTypes(NIAllTypes nIAllTypes) { + return _echoNIAllTypes(nIAllTypes); + } + + NIAllNullableTypes? echoNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + return _echoNIAllNullableTypes(nIAllNullableTypes); + } + + NIAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + return _sendMultipleNullableTypes(boolean, long, string); + } + + NIAllNullableTypesWithoutRecursion? echoNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + return _echoNIAllNullableTypesWithoutRecursion( + nIAllNullableTypesWithoutRecursion, + ); + } + + NIAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + return _sendMultipleNullableTypesWithoutRecursion(boolean, long, string); + } + + core$_.bool echoBool(core$_.bool z) { + return _echoBool(z); + } + + core$_.int echoInt(core$_.int j) { + return _echoInt(j); + } + + core$_.double echoDouble(core$_.double d) { + return _echoDouble(d); + } + + jni$_.JString echoString(jni$_.JString string) { + return _echoString(string); + } + + jni$_.JByteArray echoUint8List(jni$_.JByteArray bs) { + return _echoUint8List(bs); + } + + jni$_.JIntArray echoInt32List(jni$_.JIntArray is$) { + return _echoInt32List(is$); + } + + jni$_.JLongArray echoInt64List(jni$_.JLongArray js) { + return _echoInt64List(js); + } + + jni$_.JDoubleArray echoFloat64List(jni$_.JDoubleArray ds) { + return _echoFloat64List(ds); + } + + jni$_.JList echoList(jni$_.JList list) { + return _echoList(list); + } + + jni$_.JList echoEnumList(jni$_.JList list) { + return _echoEnumList(list); + } + + jni$_.JList echoClassList( + jni$_.JList list, + ) { + return _echoClassList(list); + } + + jni$_.JList echoNonNullEnumList(jni$_.JList list) { + return _echoNonNullEnumList(list); + } + + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ) { + return _echoNonNullClassList(list); + } + + jni$_.JMap echoMap( + jni$_.JMap map, + ) { + return _echoMap(map); + } + + jni$_.JMap echoStringMap( + jni$_.JMap map, + ) { + return _echoStringMap(map); + } + + jni$_.JMap echoIntMap( + jni$_.JMap map, + ) { + return _echoIntMap(map); + } + + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ) { + return _echoEnumMap(map); + } + + jni$_.JMap echoClassMap( + jni$_.JMap map, + ) { + return _echoClassMap(map); + } + + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ) { + return _echoNonNullStringMap(map); + } + + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ) { + return _echoNonNullIntMap(map); + } + + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ) { + return _echoNonNullEnumMap(map); + } + + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ) { + return _echoNonNullClassMap(map); + } + + NIAnEnum echoEnum(NIAnEnum nIAnEnum) { + return _echoEnum(nIAnEnum); + } + + NIAnotherEnum echoNIAnotherEnum(NIAnotherEnum nIAnotherEnum) { + return _echoNIAnotherEnum(nIAnotherEnum); + } + + jni$_.JBoolean? echoNullableBool(jni$_.JBoolean? boolean) { + return _echoNullableBool(boolean); + } + + jni$_.JLong? echoNullableInt(jni$_.JLong? long) { + return _echoNullableInt(long); + } + + jni$_.JDouble? echoNullableDouble(jni$_.JDouble? double) { + return _echoNullableDouble(double); + } + + jni$_.JString? echoNullableString(jni$_.JString? string) { + return _echoNullableString(string); + } + + jni$_.JByteArray? echoNullableUint8List(jni$_.JByteArray? bs) { + return _echoNullableUint8List(bs); + } + + jni$_.JIntArray? echoNullableInt32List(jni$_.JIntArray? is$) { + return _echoNullableInt32List(is$); + } + + jni$_.JLongArray? echoNullableInt64List(jni$_.JLongArray? js) { + return _echoNullableInt64List(js); + } + + jni$_.JDoubleArray? echoNullableFloat64List(jni$_.JDoubleArray? ds) { + return _echoNullableFloat64List(ds); + } + + jni$_.JList? echoNullableList( + jni$_.JList? list, + ) { + return _echoNullableList(list); + } + + jni$_.JList? echoNullableEnumList(jni$_.JList? list) { + return _echoNullableEnumList(list); + } + + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ) { + return _echoNullableClassList(list); + } + + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ) { + return _echoNullableNonNullEnumList(list); + } + + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ) { + return _echoNullableNonNullClassList(list); + } + + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ) { + return _echoNullableMap(map); + } + + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ) { + return _echoNullableStringMap(map); + } + + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ) { + return _echoNullableIntMap(map); + } + + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ) { + return _echoNullableEnumMap(map); + } + + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ) { + return _echoNullableClassMap(map); + } + + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + return _echoNullableNonNullStringMap(map); + } + + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + return _echoNullableNonNullIntMap(map); + } + + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + return _echoNullableNonNullEnumMap(map); + } + + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + return _echoNullableNonNullClassMap(map); + } + + NIAnEnum? echoNullableEnum(NIAnEnum? nIAnEnum) { + return _echoNullableEnum(nIAnEnum); + } + + NIAnotherEnum? echoAnotherNullableEnum(NIAnotherEnum? nIAnotherEnum) { + return _echoAnotherNullableEnum(nIAnotherEnum); + } + + core$_.Future noopAsync() { + return _noopAsync(); + } + + core$_.Future throwFlutterErrorAsync() { + return _throwFlutterErrorAsync(); + } + + core$_.Future echoAsyncNIAllTypes(NIAllTypes nIAllTypes) { + return _echoAsyncNIAllTypes(nIAllTypes); + } + + core$_.Future echoAsyncNullableNIAllNullableTypes( + NIAllNullableTypes? nIAllNullableTypes, + ) { + return _echoAsyncNullableNIAllNullableTypes(nIAllNullableTypes); + } + + core$_.Future + echoAsyncNullableNIAllNullableTypesWithoutRecursion( + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + ) { + return _echoAsyncNullableNIAllNullableTypesWithoutRecursion( + nIAllNullableTypesWithoutRecursion, + ); + } + + core$_.Future echoAsyncBool(core$_.bool z) { + return _echoAsyncBool(z); + } + + core$_.Future echoAsyncInt(core$_.int j) { + return _echoAsyncInt(j); + } + + core$_.Future echoAsyncDouble(core$_.double d) { + return _echoAsyncDouble(d); + } + + core$_.Future echoAsyncString(jni$_.JString string) { + return _echoAsyncString(string); + } + + core$_.Future echoAsyncUint8List(jni$_.JByteArray bs) { + return _echoAsyncUint8List(bs); + } + + core$_.Future echoAsyncInt32List(jni$_.JIntArray is$) { + return _echoAsyncInt32List(is$); + } + + core$_.Future echoAsyncInt64List(jni$_.JLongArray js) { + return _echoAsyncInt64List(js); + } + + core$_.Future echoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) { + return _echoAsyncFloat64List(ds); + } + + core$_.Future echoAsyncObject(jni$_.JObject object) { + return _echoAsyncObject(object); + } + + core$_.Future> echoAsyncList( + jni$_.JList list, + ) { + return _echoAsyncList(list); + } + + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ) { + return _echoAsyncEnumList(list); + } + + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ) { + return _echoAsyncClassList(list); + } + + core$_.Future> echoAsyncNonNullEnumList( + jni$_.JList list, + ) { + return _echoAsyncNonNullEnumList(list); + } + + core$_.Future> echoAsyncNonNullClassList( + jni$_.JList list, + ) { + return _echoAsyncNonNullClassList(list); + } + + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ) { + return _echoAsyncMap(map); + } + + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ) { + return _echoAsyncStringMap(map); + } + + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ) { + return _echoAsyncIntMap(map); + } + + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ) { + return _echoAsyncEnumMap(map); + } + + core$_.Future> + echoAsyncClassMap(jni$_.JMap map) { + return _echoAsyncClassMap(map); + } + + core$_.Future echoAsyncEnum(NIAnEnum nIAnEnum) { + return _echoAsyncEnum(nIAnEnum); + } + + core$_.Future echoAnotherAsyncEnum( + NIAnotherEnum nIAnotherEnum, + ) { + return _echoAnotherAsyncEnum(nIAnotherEnum); + } + + core$_.Future echoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) { + return _echoAsyncNullableBool(boolean); + } + + core$_.Future echoAsyncNullableInt(jni$_.JLong? long) { + return _echoAsyncNullableInt(long); + } + + core$_.Future echoAsyncNullableDouble(jni$_.JDouble? double) { + return _echoAsyncNullableDouble(double); + } + + core$_.Future echoAsyncNullableString(jni$_.JString? string) { + return _echoAsyncNullableString(string); + } + + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) { + return _echoAsyncNullableUint8List(bs); + } + + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) { + return _echoAsyncNullableInt32List(is$); + } + + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) { + return _echoAsyncNullableInt64List(js); + } + + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) { + return _echoAsyncNullableFloat64List(ds); + } + + core$_.Future echoAsyncNullableObject(jni$_.JObject? object) { + return _echoAsyncNullableObject(object); + } + + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ) { + return _echoAsyncNullableList(list); + } + + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ) { + return _echoAsyncNullableEnumList(list); + } + + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ) { + return _echoAsyncNullableClassList(list); + } + + core$_.Future?> echoAsyncNullableNonNullEnumList( + jni$_.JList? list, + ) { + return _echoAsyncNullableNonNullEnumList(list); + } + + core$_.Future?> + echoAsyncNullableNonNullClassList(jni$_.JList? list) { + return _echoAsyncNullableNonNullClassList(list); + } + + core$_.Future?> + echoAsyncNullableMap(jni$_.JMap? map) { + return _echoAsyncNullableMap(map); + } + + core$_.Future?> + echoAsyncNullableStringMap(jni$_.JMap? map) { + return _echoAsyncNullableStringMap(map); + } + + core$_.Future?> + echoAsyncNullableIntMap(jni$_.JMap? map) { + return _echoAsyncNullableIntMap(map); + } + + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ) { + return _echoAsyncNullableEnumMap(map); + } + + core$_.Future?> + echoAsyncNullableClassMap( + jni$_.JMap? map, + ) { + return _echoAsyncNullableClassMap(map); + } + + core$_.Future echoAsyncNullableEnum(NIAnEnum? nIAnEnum) { + return _echoAsyncNullableEnum(nIAnEnum); + } + + core$_.Future echoAnotherAsyncNullableEnum( + NIAnotherEnum? nIAnotherEnum, + ) { + return _echoAnotherAsyncNullableEnum(nIAnotherEnum); + } +} + +final class $NIFlutterIntegrationCoreApi$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIFlutterIntegrationCoreApi$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIFlutterIntegrationCoreApi;'; +} + +/// from: `NIFlutterIntegrationCoreApiRegistrar` +extension type NIFlutterIntegrationCoreApiRegistrar._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'NIFlutterIntegrationCoreApiRegistrar', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIFlutterIntegrationCoreApiRegistrar$Type$(); + static final _id_new$ = _class.constructorId(r'()V'); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NIFlutterIntegrationCoreApiRegistrar() { + return _new$( + _class.reference.pointer, + _id_new$.pointer, + ).object(); + } +} + +extension NIFlutterIntegrationCoreApiRegistrar$$Methods + on NIFlutterIntegrationCoreApiRegistrar { + static final _id_registerInstance = NIFlutterIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'registerInstance', + r'(LNIFlutterIntegrationCoreApi;Ljava/lang/String;)V', + ); + + static final _registerInstance = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + (jni$_.Pointer, jni$_.Pointer) + >, + ) + > + >('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun registerInstance(api: NIFlutterIntegrationCoreApi, name: kotlin.String): kotlin.Unit` + void registerInstance( + NIFlutterIntegrationCoreApi nIFlutterIntegrationCoreApi, + jni$_.JString string, + ) { + final _$nIFlutterIntegrationCoreApi = nIFlutterIntegrationCoreApi.reference; + final _$string = string.reference; + _registerInstance( + reference.pointer, + _id_registerInstance.pointer, + _$nIFlutterIntegrationCoreApi.pointer, + _$string.pointer, + ).check(); + } + + static final _id_getInstance = NIFlutterIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)LNIFlutterIntegrationCoreApi;', + ); + + static final _getInstance = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun getInstance(name: kotlin.String): NIFlutterIntegrationCoreApi?` + /// The returned object must be released after use, by calling the [release] method. + NIFlutterIntegrationCoreApi? getInstance(jni$_.JString string) { + final _$string = string.reference; + return _getInstance( + reference.pointer, + _id_getInstance.pointer, + _$string.pointer, + ).object(); + } +} + +final class $NIFlutterIntegrationCoreApiRegistrar$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIFlutterIntegrationCoreApiRegistrar$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIFlutterIntegrationCoreApiRegistrar;'; +} + +/// from: `NIUnusedClass$Companion` +extension type NIUnusedClass$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIUnusedClass$Companion'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIUnusedClass$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIUnusedClass$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIUnusedClass$Companion$$Methods on NIUnusedClass$Companion { + static final _id_fromList = NIUnusedClass$Companion._class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LNIUnusedClass;', + ); + + static final _fromList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun fromList(pigeonVar_list: kotlin.collections.List): NIUnusedClass` + /// The returned object must be released after use, by calling the [release] method. + NIUnusedClass fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NIUnusedClass$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIUnusedClass$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIUnusedClass$Companion;'; +} + +/// from: `NIUnusedClass` +extension type NIUnusedClass._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIUnusedClass'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NIUnusedClass$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIUnusedClass$Companion;', + ); + + /// from: `static public final NIUnusedClass$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIUnusedClass$Companion get Companion => + _id_Companion.get(_class, NIUnusedClass$Companion.type) + as NIUnusedClass$Companion; + + static final _id_new$ = _class.constructorId(r'(Ljava/lang/Object;)V'); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public void (java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + factory NIUnusedClass(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$object.pointer, + ).object(); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (java.lang.Object object, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIUnusedClass.new$1( + jni$_.JObject? object, + core$_.int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$1( + _class.reference.pointer, + _id_new$1.pointer, + _$object.pointer, + i, + _$defaultConstructorMarker.pointer, + ).object(); + } + + static final _id_new$2 = _class.constructorId(r'()V'); + + static final _new$2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NIUnusedClass.new$2() { + return _new$2( + _class.reference.pointer, + _id_new$2.pointer, + ).object(); + } +} + +extension NIUnusedClass$$Methods on NIUnusedClass { + static final _id_get$aField = NIUnusedClass._class.instanceMethodId( + r'getAField', + r'()Ljava/lang/Object;', + ); + + static final _get$aField = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Object getAField()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? get aField { + return _get$aField( + reference.pointer, + _id_get$aField.pointer, + ).object(); + } + + static final _id_toList = NIUnusedClass._class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toList(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList( + reference.pointer, + _id_toList.pointer, + ).object>(); + } + + static final _id_equals = NIUnusedClass._class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public operator fun equals(other: kotlin.Any?): kotlin.Boolean` + core$_.bool equals(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals.pointer, + _$object.pointer, + ).boolean; + } + + static final _id_hashCode$1 = NIUnusedClass._class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_component1 = NIUnusedClass._class.instanceMethodId( + r'component1', + r'()Ljava/lang/Object;', + ); + + static final _component1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component1(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? component1() { + return _component1( + reference.pointer, + _id_component1.pointer, + ).object(); + } + + static final _id_copy = NIUnusedClass._class.instanceMethodId( + r'copy', + r'(Ljava/lang/Object;)LNIUnusedClass;', + ); + + static final _copy = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun copy(aField: kotlin.Any?): NIUnusedClass` + /// The returned object must be released after use, by calling the [release] method. + NIUnusedClass copy(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy.pointer, + _$object.pointer, + ).object(); + } + + static final _id_toString$1 = NIUnusedClass._class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toString(): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1( + reference.pointer, + _id_toString$1.pointer, + ).object(); + } +} + +final class $NIUnusedClass$Type$ extends jni$_.JType { + @jni$_.internal + const $NIUnusedClass$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIUnusedClass;'; +} + +/// from: `NIAllTypes$Companion` +extension type NIAllTypes$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAllTypes$Companion'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllTypes$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllTypes$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAllTypes$Companion$$Methods on NIAllTypes$Companion { + static final _id_fromList = NIAllTypes$Companion._class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LNIAllTypes;', + ); + + static final _fromList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun fromList(pigeonVar_list: kotlin.collections.List): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NIAllTypes$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAllTypes$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllTypes$Companion;'; +} + +/// from: `NIAllTypes` +extension type NIAllTypes._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAllTypes'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NIAllTypes$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIAllTypes$Companion;', + ); + + /// from: `static public final NIAllTypes$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIAllTypes$Companion get Companion => + _id_Companion.get(_class, NIAllTypes$Companion.type) + as NIAllTypes$Companion; + + static final _id_new$ = _class.constructorId( + r'(ZJJD[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int32, + jni$_.Int64, + jni$_.Int64, + jni$_.Double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + core$_.int, + core$_.int, + core$_.double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void (boolean z, long j, long j1, double d, byte[] bs, int[] is, long[] js, double[] ds, NIAnEnum nIAnEnum, NIAnotherEnum nIAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllTypes( + core$_.bool z, + core$_.int j, + core$_.int j1, + core$_.double d, + jni$_.JByteArray bs, + jni$_.JIntArray is$, + jni$_.JLongArray js, + jni$_.JDoubleArray ds, + NIAnEnum nIAnEnum, + NIAnotherEnum nIAnotherEnum, + jni$_.JString string, + jni$_.JObject object, + jni$_.JList list, + jni$_.JList list1, + jni$_.JList list2, + jni$_.JList list3, + jni$_.JList list4, + jni$_.JList list5, + jni$_.JList list6, + jni$_.JList> list7, + jni$_.JList> list8, + jni$_.JMap map, + jni$_.JMap map1, + jni$_.JMap map2, + jni$_.JMap map3, + jni$_.JMap map4, + jni$_.JMap> map5, + jni$_.JMap> map6, + ) { + final _$bs = bs.reference; + final _$is$ = is$.reference; + final _$js = js.reference; + final _$ds = ds.reference; + final _$nIAnEnum = nIAnEnum.reference; + final _$nIAnotherEnum = nIAnotherEnum.reference; + final _$string = string.reference; + final _$object = object.reference; + final _$list = list.reference; + final _$list1 = list1.reference; + final _$list2 = list2.reference; + final _$list3 = list3.reference; + final _$list4 = list4.reference; + final _$list5 = list5.reference; + final _$list6 = list6.reference; + final _$list7 = list7.reference; + final _$list8 = list8.reference; + final _$map = map.reference; + final _$map1 = map1.reference; + final _$map2 = map2.reference; + final _$map3 = map3.reference; + final _$map4 = map4.reference; + final _$map5 = map5.reference; + final _$map6 = map6.reference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + z ? 1 : 0, + j, + j1, + d, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + ).object(); + } +} + +extension NIAllTypes$$Methods on NIAllTypes { + static final _id_get$aBool = NIAllTypes._class.instanceMethodId( + r'getABool', + r'()Z', + ); + + static final _get$aBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final boolean getABool()` + core$_.bool get aBool { + return _get$aBool(reference.pointer, _id_get$aBool.pointer).boolean; + } + + static final _id_get$anInt = NIAllTypes._class.instanceMethodId( + r'getAnInt', + r'()J', + ); + + static final _get$anInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final long getAnInt()` + core$_.int get anInt { + return _get$anInt(reference.pointer, _id_get$anInt.pointer).long; + } + + static final _id_get$anInt64 = NIAllTypes._class.instanceMethodId( + r'getAnInt64', + r'()J', + ); + + static final _get$anInt64 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final long getAnInt64()` + core$_.int get anInt64 { + return _get$anInt64(reference.pointer, _id_get$anInt64.pointer).long; + } + + static final _id_get$aDouble = NIAllTypes._class.instanceMethodId( + r'getADouble', + r'()D', + ); + + static final _get$aDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final double getADouble()` + core$_.double get aDouble { + return _get$aDouble(reference.pointer, _id_get$aDouble.pointer).doubleFloat; + } + + static final _id_get$aByteArray = NIAllTypes._class.instanceMethodId( + r'getAByteArray', + r'()[B', + ); + + static final _get$aByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final byte[] getAByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray get aByteArray { + return _get$aByteArray( + reference.pointer, + _id_get$aByteArray.pointer, + ).object(); + } + + static final _id_get$a4ByteArray = NIAllTypes._class.instanceMethodId( + r'getA4ByteArray', + r'()[I', + ); + + static final _get$a4ByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final int[] getA4ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray get a4ByteArray { + return _get$a4ByteArray( + reference.pointer, + _id_get$a4ByteArray.pointer, + ).object(); + } + + static final _id_get$a8ByteArray = NIAllTypes._class.instanceMethodId( + r'getA8ByteArray', + r'()[J', + ); + + static final _get$a8ByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final long[] getA8ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray get a8ByteArray { + return _get$a8ByteArray( + reference.pointer, + _id_get$a8ByteArray.pointer, + ).object(); + } + + static final _id_get$aFloatArray = NIAllTypes._class.instanceMethodId( + r'getAFloatArray', + r'()[D', + ); + + static final _get$aFloatArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final double[] getAFloatArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray get aFloatArray { + return _get$aFloatArray( + reference.pointer, + _id_get$aFloatArray.pointer, + ).object(); + } + + static final _id_get$anEnum = NIAllTypes._class.instanceMethodId( + r'getAnEnum', + r'()LNIAnEnum;', + ); + + static final _get$anEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAnEnum getAnEnum()` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum get anEnum { + return _get$anEnum( + reference.pointer, + _id_get$anEnum.pointer, + ).object(); + } + + static final _id_get$anotherEnum = NIAllTypes._class.instanceMethodId( + r'getAnotherEnum', + r'()LNIAnotherEnum;', + ); + + static final _get$anotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAnotherEnum getAnotherEnum()` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum get anotherEnum { + return _get$anotherEnum( + reference.pointer, + _id_get$anotherEnum.pointer, + ).object(); + } + + static final _id_get$aString = NIAllTypes._class.instanceMethodId( + r'getAString', + r'()Ljava/lang/String;', + ); + + static final _get$aString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.String getAString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString get aString { + return _get$aString( + reference.pointer, + _id_get$aString.pointer, + ).object(); + } + + static final _id_get$anObject = NIAllTypes._class.instanceMethodId( + r'getAnObject', + r'()Ljava/lang/Object;', + ); + + static final _get$anObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Object getAnObject()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject get anObject { + return _get$anObject( + reference.pointer, + _id_get$anObject.pointer, + ).object(); + } + + static final _id_get$list = NIAllTypes._class.instanceMethodId( + r'getList', + r'()Ljava/util/List;', + ); + + static final _get$list = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get list { + return _get$list( + reference.pointer, + _id_get$list.pointer, + ).object>(); + } + + static final _id_get$stringList = NIAllTypes._class.instanceMethodId( + r'getStringList', + r'()Ljava/util/List;', + ); + + static final _get$stringList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getStringList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get stringList { + return _get$stringList( + reference.pointer, + _id_get$stringList.pointer, + ).object>(); + } + + static final _id_get$intList = NIAllTypes._class.instanceMethodId( + r'getIntList', + r'()Ljava/util/List;', + ); + + static final _get$intList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getIntList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get intList { + return _get$intList( + reference.pointer, + _id_get$intList.pointer, + ).object>(); + } + + static final _id_get$doubleList = NIAllTypes._class.instanceMethodId( + r'getDoubleList', + r'()Ljava/util/List;', + ); + + static final _get$doubleList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getDoubleList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get doubleList { + return _get$doubleList( + reference.pointer, + _id_get$doubleList.pointer, + ).object>(); + } + + static final _id_get$boolList = NIAllTypes._class.instanceMethodId( + r'getBoolList', + r'()Ljava/util/List;', + ); + + static final _get$boolList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getBoolList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get boolList { + return _get$boolList( + reference.pointer, + _id_get$boolList.pointer, + ).object>(); + } + + static final _id_get$enumList = NIAllTypes._class.instanceMethodId( + r'getEnumList', + r'()Ljava/util/List;', + ); + + static final _get$enumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getEnumList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get enumList { + return _get$enumList( + reference.pointer, + _id_get$enumList.pointer, + ).object>(); + } + + static final _id_get$objectList = NIAllTypes._class.instanceMethodId( + r'getObjectList', + r'()Ljava/util/List;', + ); + + static final _get$objectList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getObjectList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get objectList { + return _get$objectList( + reference.pointer, + _id_get$objectList.pointer, + ).object>(); + } + + static final _id_get$listList = NIAllTypes._class.instanceMethodId( + r'getListList', + r'()Ljava/util/List;', + ); + + static final _get$listList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List> getListList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> get listList { + return _get$listList( + reference.pointer, + _id_get$listList.pointer, + ).object>>(); + } + + static final _id_get$mapList = NIAllTypes._class.instanceMethodId( + r'getMapList', + r'()Ljava/util/List;', + ); + + static final _get$mapList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List> getMapList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> get mapList { + return _get$mapList( + reference.pointer, + _id_get$mapList.pointer, + ).object>>(); + } + + static final _id_get$map = NIAllTypes._class.instanceMethodId( + r'getMap', + r'()Ljava/util/Map;', + ); + + static final _get$map = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap get map { + return _get$map( + reference.pointer, + _id_get$map.pointer, + ).object>(); + } + + static final _id_get$stringMap = NIAllTypes._class.instanceMethodId( + r'getStringMap', + r'()Ljava/util/Map;', + ); + + static final _get$stringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getStringMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap get stringMap { + return _get$stringMap( + reference.pointer, + _id_get$stringMap.pointer, + ).object>(); + } + + static final _id_get$intMap = NIAllTypes._class.instanceMethodId( + r'getIntMap', + r'()Ljava/util/Map;', + ); + + static final _get$intMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getIntMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap get intMap { + return _get$intMap( + reference.pointer, + _id_get$intMap.pointer, + ).object>(); + } + + static final _id_get$enumMap = NIAllTypes._class.instanceMethodId( + r'getEnumMap', + r'()Ljava/util/Map;', + ); + + static final _get$enumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getEnumMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap get enumMap { + return _get$enumMap( + reference.pointer, + _id_get$enumMap.pointer, + ).object>(); + } + + static final _id_get$objectMap = NIAllTypes._class.instanceMethodId( + r'getObjectMap', + r'()Ljava/util/Map;', + ); + + static final _get$objectMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getObjectMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap get objectMap { + return _get$objectMap( + reference.pointer, + _id_get$objectMap.pointer, + ).object>(); + } + + static final _id_get$listMap = NIAllTypes._class.instanceMethodId( + r'getListMap', + r'()Ljava/util/Map;', + ); + + static final _get$listMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map> getListMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> get listMap { + return _get$listMap( + reference.pointer, + _id_get$listMap.pointer, + ).object>>(); + } + + static final _id_get$mapMap = NIAllTypes._class.instanceMethodId( + r'getMapMap', + r'()Ljava/util/Map;', + ); + + static final _get$mapMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map> getMapMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> + get mapMap { + return _get$mapMap(reference.pointer, _id_get$mapMap.pointer) + .object< + jni$_.JMap> + >(); + } + + static final _id_toList = NIAllTypes._class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toList(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList( + reference.pointer, + _id_toList.pointer, + ).object>(); + } + + static final _id_equals = NIAllTypes._class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public operator fun equals(other: kotlin.Any?): kotlin.Boolean` + core$_.bool equals(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals.pointer, + _$object.pointer, + ).boolean; + } + + static final _id_hashCode$1 = NIAllTypes._class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_component1 = NIAllTypes._class.instanceMethodId( + r'component1', + r'()Z', + ); + + static final _component1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component1(): kotlin.Boolean` + core$_.bool component1() { + return _component1(reference.pointer, _id_component1.pointer).boolean; + } + + static final _id_component2 = NIAllTypes._class.instanceMethodId( + r'component2', + r'()J', + ); + + static final _component2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component2(): kotlin.Long` + core$_.int component2() { + return _component2(reference.pointer, _id_component2.pointer).long; + } + + static final _id_component3 = NIAllTypes._class.instanceMethodId( + r'component3', + r'()J', + ); + + static final _component3 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component3(): kotlin.Long` + core$_.int component3() { + return _component3(reference.pointer, _id_component3.pointer).long; + } + + static final _id_component4 = NIAllTypes._class.instanceMethodId( + r'component4', + r'()D', + ); + + static final _component4 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component4(): kotlin.Double` + core$_.double component4() { + return _component4(reference.pointer, _id_component4.pointer).doubleFloat; + } + + static final _id_component5 = NIAllTypes._class.instanceMethodId( + r'component5', + r'()[B', + ); + + static final _component5 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component5(): kotlin.ByteArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray component5() { + return _component5( + reference.pointer, + _id_component5.pointer, + ).object(); + } + + static final _id_component6 = NIAllTypes._class.instanceMethodId( + r'component6', + r'()[I', + ); + + static final _component6 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component6(): kotlin.IntArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray component6() { + return _component6( + reference.pointer, + _id_component6.pointer, + ).object(); + } + + static final _id_component7 = NIAllTypes._class.instanceMethodId( + r'component7', + r'()[J', + ); + + static final _component7 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component7(): kotlin.LongArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray component7() { + return _component7( + reference.pointer, + _id_component7.pointer, + ).object(); + } + + static final _id_component8 = NIAllTypes._class.instanceMethodId( + r'component8', + r'()[D', + ); + + static final _component8 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component8(): kotlin.DoubleArray` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray component8() { + return _component8( + reference.pointer, + _id_component8.pointer, + ).object(); + } + + static final _id_component9 = NIAllTypes._class.instanceMethodId( + r'component9', + r'()LNIAnEnum;', + ); + + static final _component9 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component9(): NIAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum component9() { + return _component9( + reference.pointer, + _id_component9.pointer, + ).object(); + } + + static final _id_component10 = NIAllTypes._class.instanceMethodId( + r'component10', + r'()LNIAnotherEnum;', + ); + + static final _component10 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component10(): NIAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum component10() { + return _component10( + reference.pointer, + _id_component10.pointer, + ).object(); + } + + static final _id_component11 = NIAllTypes._class.instanceMethodId( + r'component11', + r'()Ljava/lang/String;', + ); + + static final _component11 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component11(): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString component11() { + return _component11( + reference.pointer, + _id_component11.pointer, + ).object(); + } + + static final _id_component12 = NIAllTypes._class.instanceMethodId( + r'component12', + r'()Ljava/lang/Object;', + ); + + static final _component12 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component12(): kotlin.Any` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject component12() { + return _component12( + reference.pointer, + _id_component12.pointer, + ).object(); + } + + static final _id_component13 = NIAllTypes._class.instanceMethodId( + r'component13', + r'()Ljava/util/List;', + ); + + static final _component13 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component13(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component13() { + return _component13( + reference.pointer, + _id_component13.pointer, + ).object>(); + } + + static final _id_component14 = NIAllTypes._class.instanceMethodId( + r'component14', + r'()Ljava/util/List;', + ); + + static final _component14 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component14(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component14() { + return _component14( + reference.pointer, + _id_component14.pointer, + ).object>(); + } + + static final _id_component15 = NIAllTypes._class.instanceMethodId( + r'component15', + r'()Ljava/util/List;', + ); + + static final _component15 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component15(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component15() { + return _component15( + reference.pointer, + _id_component15.pointer, + ).object>(); + } + + static final _id_component16 = NIAllTypes._class.instanceMethodId( + r'component16', + r'()Ljava/util/List;', + ); + + static final _component16 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component16(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component16() { + return _component16( + reference.pointer, + _id_component16.pointer, + ).object>(); + } + + static final _id_component17 = NIAllTypes._class.instanceMethodId( + r'component17', + r'()Ljava/util/List;', + ); + + static final _component17 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component17(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component17() { + return _component17( + reference.pointer, + _id_component17.pointer, + ).object>(); + } + + static final _id_component18 = NIAllTypes._class.instanceMethodId( + r'component18', + r'()Ljava/util/List;', + ); + + static final _component18 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component18(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component18() { + return _component18( + reference.pointer, + _id_component18.pointer, + ).object>(); + } + + static final _id_component19 = NIAllTypes._class.instanceMethodId( + r'component19', + r'()Ljava/util/List;', + ); + + static final _component19 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component19(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component19() { + return _component19( + reference.pointer, + _id_component19.pointer, + ).object>(); + } + + static final _id_component20 = NIAllTypes._class.instanceMethodId( + r'component20', + r'()Ljava/util/List;', + ); + + static final _component20 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component20(): kotlin.collections.List>` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> component20() { + return _component20( + reference.pointer, + _id_component20.pointer, + ).object>>(); + } + + static final _id_component21 = NIAllTypes._class.instanceMethodId( + r'component21', + r'()Ljava/util/List;', + ); + + static final _component21 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component21(): kotlin.collections.List>` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> component21() { + return _component21( + reference.pointer, + _id_component21.pointer, + ).object>>(); + } + + static final _id_component22 = NIAllTypes._class.instanceMethodId( + r'component22', + r'()Ljava/util/Map;', + ); + + static final _component22 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component22(): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component22() { + return _component22( + reference.pointer, + _id_component22.pointer, + ).object>(); + } + + static final _id_component23 = NIAllTypes._class.instanceMethodId( + r'component23', + r'()Ljava/util/Map;', + ); + + static final _component23 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component23(): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component23() { + return _component23( + reference.pointer, + _id_component23.pointer, + ).object>(); + } + + static final _id_component24 = NIAllTypes._class.instanceMethodId( + r'component24', + r'()Ljava/util/Map;', + ); + + static final _component24 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component24(): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component24() { + return _component24( + reference.pointer, + _id_component24.pointer, + ).object>(); + } + + static final _id_component25 = NIAllTypes._class.instanceMethodId( + r'component25', + r'()Ljava/util/Map;', + ); + + static final _component25 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component25(): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component25() { + return _component25( + reference.pointer, + _id_component25.pointer, + ).object>(); + } + + static final _id_component26 = NIAllTypes._class.instanceMethodId( + r'component26', + r'()Ljava/util/Map;', + ); + + static final _component26 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component26(): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component26() { + return _component26( + reference.pointer, + _id_component26.pointer, + ).object>(); + } + + static final _id_component27 = NIAllTypes._class.instanceMethodId( + r'component27', + r'()Ljava/util/Map;', + ); + + static final _component27 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component27(): kotlin.collections.Map>` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> component27() { + return _component27( + reference.pointer, + _id_component27.pointer, + ).object>>(); + } + + static final _id_component28 = NIAllTypes._class.instanceMethodId( + r'component28', + r'()Ljava/util/Map;', + ); + + static final _component28 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component28(): kotlin.collections.Map>` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> + component28() { + return _component28(reference.pointer, _id_component28.pointer) + .object< + jni$_.JMap> + >(); + } + + static final _id_copy = NIAllTypes._class.instanceMethodId( + r'copy', + r'(ZJJD[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)LNIAllTypes;', + ); + + static final _copy = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int32, + jni$_.Int64, + jni$_.Int64, + jni$_.Double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + core$_.int, + core$_.int, + core$_.double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun copy(aBool: kotlin.Boolean, anInt: kotlin.Long, anInt64: kotlin.Long, aDouble: kotlin.Double, aByteArray: kotlin.ByteArray, a4ByteArray: kotlin.IntArray, a8ByteArray: kotlin.LongArray, aFloatArray: kotlin.DoubleArray, anEnum: NIAnEnum, anotherEnum: NIAnotherEnum, aString: kotlin.String, anObject: kotlin.Any, list: kotlin.collections.List, stringList: kotlin.collections.List, intList: kotlin.collections.List, doubleList: kotlin.collections.List, boolList: kotlin.collections.List, enumList: kotlin.collections.List, objectList: kotlin.collections.List, listList: kotlin.collections.List>, mapList: kotlin.collections.List>, map: kotlin.collections.Map, stringMap: kotlin.collections.Map, intMap: kotlin.collections.Map, enumMap: kotlin.collections.Map, objectMap: kotlin.collections.Map, listMap: kotlin.collections.Map>, mapMap: kotlin.collections.Map>): NIAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes copy( + core$_.bool z, + core$_.int j, + core$_.int j1, + core$_.double d, + jni$_.JByteArray bs, + jni$_.JIntArray is$, + jni$_.JLongArray js, + jni$_.JDoubleArray ds, + NIAnEnum nIAnEnum, + NIAnotherEnum nIAnotherEnum, + jni$_.JString string, + jni$_.JObject object, + jni$_.JList list, + jni$_.JList list1, + jni$_.JList list2, + jni$_.JList list3, + jni$_.JList list4, + jni$_.JList list5, + jni$_.JList list6, + jni$_.JList> list7, + jni$_.JList> list8, + jni$_.JMap map, + jni$_.JMap map1, + jni$_.JMap map2, + jni$_.JMap map3, + jni$_.JMap map4, + jni$_.JMap> map5, + jni$_.JMap> map6, + ) { + final _$bs = bs.reference; + final _$is$ = is$.reference; + final _$js = js.reference; + final _$ds = ds.reference; + final _$nIAnEnum = nIAnEnum.reference; + final _$nIAnotherEnum = nIAnotherEnum.reference; + final _$string = string.reference; + final _$object = object.reference; + final _$list = list.reference; + final _$list1 = list1.reference; + final _$list2 = list2.reference; + final _$list3 = list3.reference; + final _$list4 = list4.reference; + final _$list5 = list5.reference; + final _$list6 = list6.reference; + final _$list7 = list7.reference; + final _$list8 = list8.reference; + final _$map = map.reference; + final _$map1 = map1.reference; + final _$map2 = map2.reference; + final _$map3 = map3.reference; + final _$map4 = map4.reference; + final _$map5 = map5.reference; + final _$map6 = map6.reference; + return _copy( + reference.pointer, + _id_copy.pointer, + z ? 1 : 0, + j, + j1, + d, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + ).object(); + } + + static final _id_toString$1 = NIAllTypes._class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toString(): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1( + reference.pointer, + _id_toString$1.pointer, + ).object(); + } +} + +final class $NIAllTypes$Type$ extends jni$_.JType { + @jni$_.internal + const $NIAllTypes$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllTypes;'; +} + +/// from: `NIAllNullableTypes$Companion` +extension type NIAllNullableTypes$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAllNullableTypes$Companion'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllNullableTypes$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypes$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAllNullableTypes$Companion$$Methods + on NIAllNullableTypes$Companion { + static final _id_fromList = NIAllNullableTypes$Companion._class + .instanceMethodId(r'fromList', r'(Ljava/util/List;)LNIAllNullableTypes;'); + + static final _fromList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun fromList(pigeonVar_list: kotlin.collections.List): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NIAllNullableTypes$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAllNullableTypes$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllNullableTypes$Companion;'; +} + +/// from: `NIAllNullableTypes` +extension type NIAllNullableTypes._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAllNullableTypes'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllNullableTypes$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIAllNullableTypes$Companion;', + ); + + /// from: `static public final NIAllNullableTypes$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIAllNullableTypes$Companion get Companion => + _id_Companion.get(_class, NIAllNullableTypes$Companion.type) + as NIAllNullableTypes$Companion; + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;LNIAllNullableTypes;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, NIAnEnum nIAnEnum, NIAnotherEnum nIAnotherEnum, java.lang.String string, java.lang.Object object, NIAllNullableTypes nIAllNullableTypes, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.List list9, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, java.util.Map map7)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NIAnEnum? nIAnEnum, + NIAnotherEnum? nIAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + NIAllNullableTypes? nIAllNullableTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JList? list9, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + jni$_.JMap? map7, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$list9 = list9?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$map7 = map7?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$nIAllNullableTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$list9.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + _$map7.pointer, + ).object(); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;LNIAllNullableTypes;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, NIAnEnum nIAnEnum, NIAnotherEnum nIAnotherEnum, java.lang.String string, java.lang.Object object, NIAllNullableTypes nIAllNullableTypes, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.List list9, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, java.util.Map map7, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypes.new$1( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NIAnEnum? nIAnEnum, + NIAnotherEnum? nIAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + NIAllNullableTypes? nIAllNullableTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList? list7, + jni$_.JList? list8, + jni$_.JList? list9, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap? map5, + jni$_.JMap? map6, + jni$_.JMap? map7, + core$_.int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$list9 = list9?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$map7 = map7?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$1( + _class.reference.pointer, + _id_new$1.pointer, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$nIAllNullableTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$list9.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + _$map7.pointer, + i, + _$defaultConstructorMarker.pointer, + ).object(); + } + + static final _id_new$2 = _class.constructorId(r'()V'); + + static final _new$2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypes.new$2() { + return _new$2( + _class.reference.pointer, + _id_new$2.pointer, + ).object(); + } +} + +extension NIAllNullableTypes$$Methods on NIAllNullableTypes { + static final _id_get$aNullableBool = NIAllNullableTypes._class + .instanceMethodId(r'getANullableBool', r'()Ljava/lang/Boolean;'); + + static final _get$aNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Boolean getANullableBool()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? get aNullableBool { + return _get$aNullableBool( + reference.pointer, + _id_get$aNullableBool.pointer, + ).object(); + } + + static final _id_get$aNullableInt = NIAllNullableTypes._class + .instanceMethodId(r'getANullableInt', r'()Ljava/lang/Long;'); + + static final _get$aNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Long getANullableInt()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? get aNullableInt { + return _get$aNullableInt( + reference.pointer, + _id_get$aNullableInt.pointer, + ).object(); + } + + static final _id_get$aNullableInt64 = NIAllNullableTypes._class + .instanceMethodId(r'getANullableInt64', r'()Ljava/lang/Long;'); + + static final _get$aNullableInt64 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Long getANullableInt64()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? get aNullableInt64 { + return _get$aNullableInt64( + reference.pointer, + _id_get$aNullableInt64.pointer, + ).object(); + } + + static final _id_get$aNullableDouble = NIAllNullableTypes._class + .instanceMethodId(r'getANullableDouble', r'()Ljava/lang/Double;'); + + static final _get$aNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Double getANullableDouble()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? get aNullableDouble { + return _get$aNullableDouble( + reference.pointer, + _id_get$aNullableDouble.pointer, + ).object(); + } + + static final _id_get$aNullableByteArray = NIAllNullableTypes._class + .instanceMethodId(r'getANullableByteArray', r'()[B'); + + static final _get$aNullableByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final byte[] getANullableByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? get aNullableByteArray { + return _get$aNullableByteArray( + reference.pointer, + _id_get$aNullableByteArray.pointer, + ).object(); + } + + static final _id_get$aNullable4ByteArray = NIAllNullableTypes._class + .instanceMethodId(r'getANullable4ByteArray', r'()[I'); + + static final _get$aNullable4ByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final int[] getANullable4ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? get aNullable4ByteArray { + return _get$aNullable4ByteArray( + reference.pointer, + _id_get$aNullable4ByteArray.pointer, + ).object(); + } + + static final _id_get$aNullable8ByteArray = NIAllNullableTypes._class + .instanceMethodId(r'getANullable8ByteArray', r'()[J'); + + static final _get$aNullable8ByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final long[] getANullable8ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? get aNullable8ByteArray { + return _get$aNullable8ByteArray( + reference.pointer, + _id_get$aNullable8ByteArray.pointer, + ).object(); + } + + static final _id_get$aNullableFloatArray = NIAllNullableTypes._class + .instanceMethodId(r'getANullableFloatArray', r'()[D'); + + static final _get$aNullableFloatArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final double[] getANullableFloatArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? get aNullableFloatArray { + return _get$aNullableFloatArray( + reference.pointer, + _id_get$aNullableFloatArray.pointer, + ).object(); + } + + static final _id_get$aNullableEnum = NIAllNullableTypes._class + .instanceMethodId(r'getANullableEnum', r'()LNIAnEnum;'); + + static final _get$aNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAnEnum getANullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? get aNullableEnum { + return _get$aNullableEnum( + reference.pointer, + _id_get$aNullableEnum.pointer, + ).object(); + } + + static final _id_get$anotherNullableEnum = NIAllNullableTypes._class + .instanceMethodId(r'getAnotherNullableEnum', r'()LNIAnotherEnum;'); + + static final _get$anotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAnotherEnum getAnotherNullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? get anotherNullableEnum { + return _get$anotherNullableEnum( + reference.pointer, + _id_get$anotherNullableEnum.pointer, + ).object(); + } + + static final _id_get$aNullableString = NIAllNullableTypes._class + .instanceMethodId(r'getANullableString', r'()Ljava/lang/String;'); + + static final _get$aNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.String getANullableString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? get aNullableString { + return _get$aNullableString( + reference.pointer, + _id_get$aNullableString.pointer, + ).object(); + } + + static final _id_get$aNullableObject = NIAllNullableTypes._class + .instanceMethodId(r'getANullableObject', r'()Ljava/lang/Object;'); + + static final _get$aNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Object getANullableObject()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? get aNullableObject { + return _get$aNullableObject( + reference.pointer, + _id_get$aNullableObject.pointer, + ).object(); + } + + static final _id_get$allNullableTypes = NIAllNullableTypes._class + .instanceMethodId(r'getAllNullableTypes', r'()LNIAllNullableTypes;'); + + static final _get$allNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAllNullableTypes getAllNullableTypes()` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? get allNullableTypes { + return _get$allNullableTypes( + reference.pointer, + _id_get$allNullableTypes.pointer, + ).object(); + } + + static final _id_get$list = NIAllNullableTypes._class.instanceMethodId( + r'getList', + r'()Ljava/util/List;', + ); + + static final _get$list = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get list { + return _get$list( + reference.pointer, + _id_get$list.pointer, + ).object?>(); + } + + static final _id_get$stringList = NIAllNullableTypes._class.instanceMethodId( + r'getStringList', + r'()Ljava/util/List;', + ); + + static final _get$stringList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getStringList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get stringList { + return _get$stringList( + reference.pointer, + _id_get$stringList.pointer, + ).object?>(); + } + + static final _id_get$intList = NIAllNullableTypes._class.instanceMethodId( + r'getIntList', + r'()Ljava/util/List;', + ); + + static final _get$intList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getIntList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get intList { + return _get$intList( + reference.pointer, + _id_get$intList.pointer, + ).object?>(); + } + + static final _id_get$doubleList = NIAllNullableTypes._class.instanceMethodId( + r'getDoubleList', + r'()Ljava/util/List;', + ); + + static final _get$doubleList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getDoubleList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get doubleList { + return _get$doubleList( + reference.pointer, + _id_get$doubleList.pointer, + ).object?>(); + } + + static final _id_get$boolList = NIAllNullableTypes._class.instanceMethodId( + r'getBoolList', + r'()Ljava/util/List;', + ); + + static final _get$boolList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getBoolList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get boolList { + return _get$boolList( + reference.pointer, + _id_get$boolList.pointer, + ).object?>(); + } + + static final _id_get$enumList = NIAllNullableTypes._class.instanceMethodId( + r'getEnumList', + r'()Ljava/util/List;', + ); + + static final _get$enumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getEnumList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get enumList { + return _get$enumList( + reference.pointer, + _id_get$enumList.pointer, + ).object?>(); + } + + static final _id_get$objectList = NIAllNullableTypes._class.instanceMethodId( + r'getObjectList', + r'()Ljava/util/List;', + ); + + static final _get$objectList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getObjectList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get objectList { + return _get$objectList( + reference.pointer, + _id_get$objectList.pointer, + ).object?>(); + } + + static final _id_get$listList = NIAllNullableTypes._class.instanceMethodId( + r'getListList', + r'()Ljava/util/List;', + ); + + static final _get$listList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List> getListList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? get listList { + return _get$listList( + reference.pointer, + _id_get$listList.pointer, + ).object?>?>(); + } + + static final _id_get$mapList = NIAllNullableTypes._class.instanceMethodId( + r'getMapList', + r'()Ljava/util/List;', + ); + + static final _get$mapList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List> getMapList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? get mapList { + return _get$mapList( + reference.pointer, + _id_get$mapList.pointer, + ).object?>?>(); + } + + static final _id_get$recursiveClassList = NIAllNullableTypes._class + .instanceMethodId(r'getRecursiveClassList', r'()Ljava/util/List;'); + + static final _get$recursiveClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getRecursiveClassList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get recursiveClassList { + return _get$recursiveClassList( + reference.pointer, + _id_get$recursiveClassList.pointer, + ).object?>(); + } + + static final _id_get$map = NIAllNullableTypes._class.instanceMethodId( + r'getMap', + r'()Ljava/util/Map;', + ); + + static final _get$map = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get map { + return _get$map( + reference.pointer, + _id_get$map.pointer, + ).object?>(); + } + + static final _id_get$stringMap = NIAllNullableTypes._class.instanceMethodId( + r'getStringMap', + r'()Ljava/util/Map;', + ); + + static final _get$stringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getStringMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get stringMap { + return _get$stringMap( + reference.pointer, + _id_get$stringMap.pointer, + ).object?>(); + } + + static final _id_get$intMap = NIAllNullableTypes._class.instanceMethodId( + r'getIntMap', + r'()Ljava/util/Map;', + ); + + static final _get$intMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getIntMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get intMap { + return _get$intMap( + reference.pointer, + _id_get$intMap.pointer, + ).object?>(); + } + + static final _id_get$enumMap = NIAllNullableTypes._class.instanceMethodId( + r'getEnumMap', + r'()Ljava/util/Map;', + ); + + static final _get$enumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getEnumMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get enumMap { + return _get$enumMap( + reference.pointer, + _id_get$enumMap.pointer, + ).object?>(); + } + + static final _id_get$objectMap = NIAllNullableTypes._class.instanceMethodId( + r'getObjectMap', + r'()Ljava/util/Map;', + ); + + static final _get$objectMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getObjectMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get objectMap { + return _get$objectMap( + reference.pointer, + _id_get$objectMap.pointer, + ).object?>(); + } + + static final _id_get$listMap = NIAllNullableTypes._class.instanceMethodId( + r'getListMap', + r'()Ljava/util/Map;', + ); + + static final _get$listMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map> getListMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? get listMap { + return _get$listMap( + reference.pointer, + _id_get$listMap.pointer, + ).object?>?>(); + } + + static final _id_get$mapMap = NIAllNullableTypes._class.instanceMethodId( + r'getMapMap', + r'()Ljava/util/Map;', + ); + + static final _get$mapMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map> getMapMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + get mapMap { + return _get$mapMap(reference.pointer, _id_get$mapMap.pointer) + .object< + jni$_.JMap?>? + >(); + } + + static final _id_get$recursiveClassMap = NIAllNullableTypes._class + .instanceMethodId(r'getRecursiveClassMap', r'()Ljava/util/Map;'); + + static final _get$recursiveClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getRecursiveClassMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get recursiveClassMap { + return _get$recursiveClassMap( + reference.pointer, + _id_get$recursiveClassMap.pointer, + ).object?>(); + } + + static final _id_toList = NIAllNullableTypes._class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toList(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList( + reference.pointer, + _id_toList.pointer, + ).object>(); + } + + static final _id_equals = NIAllNullableTypes._class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public operator fun equals(other: kotlin.Any?): kotlin.Boolean` + core$_.bool equals(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals.pointer, + _$object.pointer, + ).boolean; + } + + static final _id_hashCode$1 = NIAllNullableTypes._class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_component1 = NIAllNullableTypes._class.instanceMethodId( + r'component1', + r'()Ljava/lang/Boolean;', + ); + + static final _component1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component1(): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? component1() { + return _component1( + reference.pointer, + _id_component1.pointer, + ).object(); + } + + static final _id_component2 = NIAllNullableTypes._class.instanceMethodId( + r'component2', + r'()Ljava/lang/Long;', + ); + + static final _component2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component2(): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component2() { + return _component2( + reference.pointer, + _id_component2.pointer, + ).object(); + } + + static final _id_component3 = NIAllNullableTypes._class.instanceMethodId( + r'component3', + r'()Ljava/lang/Long;', + ); + + static final _component3 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component3(): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component3() { + return _component3( + reference.pointer, + _id_component3.pointer, + ).object(); + } + + static final _id_component4 = NIAllNullableTypes._class.instanceMethodId( + r'component4', + r'()Ljava/lang/Double;', + ); + + static final _component4 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component4(): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? component4() { + return _component4( + reference.pointer, + _id_component4.pointer, + ).object(); + } + + static final _id_component5 = NIAllNullableTypes._class.instanceMethodId( + r'component5', + r'()[B', + ); + + static final _component5 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component5(): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? component5() { + return _component5( + reference.pointer, + _id_component5.pointer, + ).object(); + } + + static final _id_component6 = NIAllNullableTypes._class.instanceMethodId( + r'component6', + r'()[I', + ); + + static final _component6 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component6(): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? component6() { + return _component6( + reference.pointer, + _id_component6.pointer, + ).object(); + } + + static final _id_component7 = NIAllNullableTypes._class.instanceMethodId( + r'component7', + r'()[J', + ); + + static final _component7 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component7(): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? component7() { + return _component7( + reference.pointer, + _id_component7.pointer, + ).object(); + } + + static final _id_component8 = NIAllNullableTypes._class.instanceMethodId( + r'component8', + r'()[D', + ); + + static final _component8 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component8(): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? component8() { + return _component8( + reference.pointer, + _id_component8.pointer, + ).object(); + } + + static final _id_component9 = NIAllNullableTypes._class.instanceMethodId( + r'component9', + r'()LNIAnEnum;', + ); + + static final _component9 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component9(): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? component9() { + return _component9( + reference.pointer, + _id_component9.pointer, + ).object(); + } + + static final _id_component10 = NIAllNullableTypes._class.instanceMethodId( + r'component10', + r'()LNIAnotherEnum;', + ); + + static final _component10 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component10(): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? component10() { + return _component10( + reference.pointer, + _id_component10.pointer, + ).object(); + } + + static final _id_component11 = NIAllNullableTypes._class.instanceMethodId( + r'component11', + r'()Ljava/lang/String;', + ); + + static final _component11 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component11(): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? component11() { + return _component11( + reference.pointer, + _id_component11.pointer, + ).object(); + } + + static final _id_component12 = NIAllNullableTypes._class.instanceMethodId( + r'component12', + r'()Ljava/lang/Object;', + ); + + static final _component12 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component12(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? component12() { + return _component12( + reference.pointer, + _id_component12.pointer, + ).object(); + } + + static final _id_component13 = NIAllNullableTypes._class.instanceMethodId( + r'component13', + r'()LNIAllNullableTypes;', + ); + + static final _component13 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component13(): NIAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes? component13() { + return _component13( + reference.pointer, + _id_component13.pointer, + ).object(); + } + + static final _id_component14 = NIAllNullableTypes._class.instanceMethodId( + r'component14', + r'()Ljava/util/List;', + ); + + static final _component14 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component14(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component14() { + return _component14( + reference.pointer, + _id_component14.pointer, + ).object?>(); + } + + static final _id_component15 = NIAllNullableTypes._class.instanceMethodId( + r'component15', + r'()Ljava/util/List;', + ); + + static final _component15 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component15(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component15() { + return _component15( + reference.pointer, + _id_component15.pointer, + ).object?>(); + } + + static final _id_component16 = NIAllNullableTypes._class.instanceMethodId( + r'component16', + r'()Ljava/util/List;', + ); + + static final _component16 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component16(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component16() { + return _component16( + reference.pointer, + _id_component16.pointer, + ).object?>(); + } + + static final _id_component17 = NIAllNullableTypes._class.instanceMethodId( + r'component17', + r'()Ljava/util/List;', + ); + + static final _component17 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component17(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component17() { + return _component17( + reference.pointer, + _id_component17.pointer, + ).object?>(); + } + + static final _id_component18 = NIAllNullableTypes._class.instanceMethodId( + r'component18', + r'()Ljava/util/List;', + ); + + static final _component18 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component18(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component18() { + return _component18( + reference.pointer, + _id_component18.pointer, + ).object?>(); + } + + static final _id_component19 = NIAllNullableTypes._class.instanceMethodId( + r'component19', + r'()Ljava/util/List;', + ); + + static final _component19 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component19(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component19() { + return _component19( + reference.pointer, + _id_component19.pointer, + ).object?>(); + } + + static final _id_component20 = NIAllNullableTypes._class.instanceMethodId( + r'component20', + r'()Ljava/util/List;', + ); + + static final _component20 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component20(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component20() { + return _component20( + reference.pointer, + _id_component20.pointer, + ).object?>(); + } + + static final _id_component21 = NIAllNullableTypes._class.instanceMethodId( + r'component21', + r'()Ljava/util/List;', + ); + + static final _component21 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component21(): kotlin.collections.List?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component21() { + return _component21( + reference.pointer, + _id_component21.pointer, + ).object?>?>(); + } + + static final _id_component22 = NIAllNullableTypes._class.instanceMethodId( + r'component22', + r'()Ljava/util/List;', + ); + + static final _component22 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component22(): kotlin.collections.List?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component22() { + return _component22( + reference.pointer, + _id_component22.pointer, + ).object?>?>(); + } + + static final _id_component23 = NIAllNullableTypes._class.instanceMethodId( + r'component23', + r'()Ljava/util/List;', + ); + + static final _component23 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component23(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component23() { + return _component23( + reference.pointer, + _id_component23.pointer, + ).object?>(); + } + + static final _id_component24 = NIAllNullableTypes._class.instanceMethodId( + r'component24', + r'()Ljava/util/Map;', + ); + + static final _component24 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component24(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component24() { + return _component24( + reference.pointer, + _id_component24.pointer, + ).object?>(); + } + + static final _id_component25 = NIAllNullableTypes._class.instanceMethodId( + r'component25', + r'()Ljava/util/Map;', + ); + + static final _component25 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component25(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component25() { + return _component25( + reference.pointer, + _id_component25.pointer, + ).object?>(); + } + + static final _id_component26 = NIAllNullableTypes._class.instanceMethodId( + r'component26', + r'()Ljava/util/Map;', + ); + + static final _component26 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component26(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component26() { + return _component26( + reference.pointer, + _id_component26.pointer, + ).object?>(); + } + + static final _id_component27 = NIAllNullableTypes._class.instanceMethodId( + r'component27', + r'()Ljava/util/Map;', + ); + + static final _component27 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component27(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component27() { + return _component27( + reference.pointer, + _id_component27.pointer, + ).object?>(); + } + + static final _id_component28 = NIAllNullableTypes._class.instanceMethodId( + r'component28', + r'()Ljava/util/Map;', + ); + + static final _component28 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component28(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component28() { + return _component28( + reference.pointer, + _id_component28.pointer, + ).object?>(); + } + + static final _id_component29 = NIAllNullableTypes._class.instanceMethodId( + r'component29', + r'()Ljava/util/Map;', + ); + + static final _component29 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component29(): kotlin.collections.Map?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? component29() { + return _component29( + reference.pointer, + _id_component29.pointer, + ).object?>?>(); + } + + static final _id_component30 = NIAllNullableTypes._class.instanceMethodId( + r'component30', + r'()Ljava/util/Map;', + ); + + static final _component30 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component30(): kotlin.collections.Map?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + component30() { + return _component30(reference.pointer, _id_component30.pointer) + .object< + jni$_.JMap?>? + >(); + } + + static final _id_component31 = NIAllNullableTypes._class.instanceMethodId( + r'component31', + r'()Ljava/util/Map;', + ); + + static final _component31 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component31(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component31() { + return _component31( + reference.pointer, + _id_component31.pointer, + ).object?>(); + } + + static final _id_copy = NIAllNullableTypes._class.instanceMethodId( + r'copy', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;LNIAllNullableTypes;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)LNIAllNullableTypes;', + ); + + static final _copy = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun copy(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableInt64: kotlin.Long?, aNullableDouble: kotlin.Double?, aNullableByteArray: kotlin.ByteArray?, aNullable4ByteArray: kotlin.IntArray?, aNullable8ByteArray: kotlin.LongArray?, aNullableFloatArray: kotlin.DoubleArray?, aNullableEnum: NIAnEnum?, anotherNullableEnum: NIAnotherEnum?, aNullableString: kotlin.String?, aNullableObject: kotlin.Any?, allNullableTypes: NIAllNullableTypes?, list: kotlin.collections.List?, stringList: kotlin.collections.List?, intList: kotlin.collections.List?, doubleList: kotlin.collections.List?, boolList: kotlin.collections.List?, enumList: kotlin.collections.List?, objectList: kotlin.collections.List?, listList: kotlin.collections.List?>?, mapList: kotlin.collections.List?>?, recursiveClassList: kotlin.collections.List?, map: kotlin.collections.Map?, stringMap: kotlin.collections.Map?, intMap: kotlin.collections.Map?, enumMap: kotlin.collections.Map?, objectMap: kotlin.collections.Map?, listMap: kotlin.collections.Map?>?, mapMap: kotlin.collections.Map?>?, recursiveClassMap: kotlin.collections.Map?): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes copy( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NIAnEnum? nIAnEnum, + NIAnotherEnum? nIAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + NIAllNullableTypes? nIAllNullableTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JList? list9, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + jni$_.JMap? map7, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$list9 = list9?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$map7 = map7?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy.pointer, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$nIAllNullableTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$list9.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + _$map7.pointer, + ).object(); + } + + static final _id_toString$1 = NIAllNullableTypes._class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toString(): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1( + reference.pointer, + _id_toString$1.pointer, + ).object(); + } +} + +final class $NIAllNullableTypes$Type$ extends jni$_.JType { + @jni$_.internal + const $NIAllNullableTypes$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllNullableTypes;'; +} + +/// from: `NIAllNullableTypesWithoutRecursion$Companion` +extension type NIAllNullableTypesWithoutRecursion$Companion._( + jni$_.JObject _$this +) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'NIAllNullableTypesWithoutRecursion$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllNullableTypesWithoutRecursion$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypesWithoutRecursion$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAllNullableTypesWithoutRecursion$Companion$$Methods + on NIAllNullableTypesWithoutRecursion$Companion { + static final _id_fromList = NIAllNullableTypesWithoutRecursion$Companion + ._class + .instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _fromList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun fromList(pigeonVar_list: kotlin.collections.List): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion fromList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NIAllNullableTypesWithoutRecursion$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAllNullableTypesWithoutRecursion$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllNullableTypesWithoutRecursion$Companion;'; +} + +/// from: `NIAllNullableTypesWithoutRecursion` +extension type NIAllNullableTypesWithoutRecursion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'NIAllNullableTypesWithoutRecursion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllNullableTypesWithoutRecursion$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIAllNullableTypesWithoutRecursion$Companion;', + ); + + /// from: `static public final NIAllNullableTypesWithoutRecursion$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIAllNullableTypesWithoutRecursion$Companion get Companion => + _id_Companion.get( + _class, + NIAllNullableTypesWithoutRecursion$Companion.type, + ) + as NIAllNullableTypesWithoutRecursion$Companion; + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, NIAnEnum nIAnEnum, NIAnotherEnum nIAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NIAnEnum? nIAnEnum, + NIAnotherEnum? nIAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + ).object(); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, NIAnEnum nIAnEnum, NIAnotherEnum nIAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypesWithoutRecursion.new$1( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NIAnEnum? nIAnEnum, + NIAnotherEnum? nIAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList? list7, + jni$_.JList? list8, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap? map5, + jni$_.JMap? map6, + core$_.int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$1( + _class.reference.pointer, + _id_new$1.pointer, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + i, + _$defaultConstructorMarker.pointer, + ).object(); + } + + static final _id_new$2 = _class.constructorId(r'()V'); + + static final _new$2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllNullableTypesWithoutRecursion.new$2() { + return _new$2( + _class.reference.pointer, + _id_new$2.pointer, + ).object(); + } +} + +extension NIAllNullableTypesWithoutRecursion$$Methods + on NIAllNullableTypesWithoutRecursion { + static final _id_get$aNullableBool = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getANullableBool', r'()Ljava/lang/Boolean;'); + + static final _get$aNullableBool = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Boolean getANullableBool()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? get aNullableBool { + return _get$aNullableBool( + reference.pointer, + _id_get$aNullableBool.pointer, + ).object(); + } + + static final _id_get$aNullableInt = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getANullableInt', r'()Ljava/lang/Long;'); + + static final _get$aNullableInt = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Long getANullableInt()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? get aNullableInt { + return _get$aNullableInt( + reference.pointer, + _id_get$aNullableInt.pointer, + ).object(); + } + + static final _id_get$aNullableInt64 = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullableInt64', r'()Ljava/lang/Long;'); + + static final _get$aNullableInt64 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Long getANullableInt64()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? get aNullableInt64 { + return _get$aNullableInt64( + reference.pointer, + _id_get$aNullableInt64.pointer, + ).object(); + } + + static final _id_get$aNullableDouble = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullableDouble', r'()Ljava/lang/Double;'); + + static final _get$aNullableDouble = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Double getANullableDouble()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? get aNullableDouble { + return _get$aNullableDouble( + reference.pointer, + _id_get$aNullableDouble.pointer, + ).object(); + } + + static final _id_get$aNullableByteArray = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullableByteArray', r'()[B'); + + static final _get$aNullableByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final byte[] getANullableByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? get aNullableByteArray { + return _get$aNullableByteArray( + reference.pointer, + _id_get$aNullableByteArray.pointer, + ).object(); + } + + static final _id_get$aNullable4ByteArray = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullable4ByteArray', r'()[I'); + + static final _get$aNullable4ByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final int[] getANullable4ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? get aNullable4ByteArray { + return _get$aNullable4ByteArray( + reference.pointer, + _id_get$aNullable4ByteArray.pointer, + ).object(); + } + + static final _id_get$aNullable8ByteArray = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullable8ByteArray', r'()[J'); + + static final _get$aNullable8ByteArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final long[] getANullable8ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? get aNullable8ByteArray { + return _get$aNullable8ByteArray( + reference.pointer, + _id_get$aNullable8ByteArray.pointer, + ).object(); + } + + static final _id_get$aNullableFloatArray = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullableFloatArray', r'()[D'); + + static final _get$aNullableFloatArray = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final double[] getANullableFloatArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? get aNullableFloatArray { + return _get$aNullableFloatArray( + reference.pointer, + _id_get$aNullableFloatArray.pointer, + ).object(); + } + + static final _id_get$aNullableEnum = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getANullableEnum', r'()LNIAnEnum;'); + + static final _get$aNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAnEnum getANullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? get aNullableEnum { + return _get$aNullableEnum( + reference.pointer, + _id_get$aNullableEnum.pointer, + ).object(); + } + + static final _id_get$anotherNullableEnum = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getAnotherNullableEnum', r'()LNIAnotherEnum;'); + + static final _get$anotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAnotherEnum getAnotherNullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? get anotherNullableEnum { + return _get$anotherNullableEnum( + reference.pointer, + _id_get$anotherNullableEnum.pointer, + ).object(); + } + + static final _id_get$aNullableString = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullableString', r'()Ljava/lang/String;'); + + static final _get$aNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.String getANullableString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? get aNullableString { + return _get$aNullableString( + reference.pointer, + _id_get$aNullableString.pointer, + ).object(); + } + + static final _id_get$aNullableObject = NIAllNullableTypesWithoutRecursion + ._class + .instanceMethodId(r'getANullableObject', r'()Ljava/lang/Object;'); + + static final _get$aNullableObject = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.lang.Object getANullableObject()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? get aNullableObject { + return _get$aNullableObject( + reference.pointer, + _id_get$aNullableObject.pointer, + ).object(); + } + + static final _id_get$list = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getList', r'()Ljava/util/List;'); + + static final _get$list = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get list { + return _get$list( + reference.pointer, + _id_get$list.pointer, + ).object?>(); + } + + static final _id_get$stringList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getStringList', r'()Ljava/util/List;'); + + static final _get$stringList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getStringList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get stringList { + return _get$stringList( + reference.pointer, + _id_get$stringList.pointer, + ).object?>(); + } + + static final _id_get$intList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getIntList', r'()Ljava/util/List;'); + + static final _get$intList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getIntList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get intList { + return _get$intList( + reference.pointer, + _id_get$intList.pointer, + ).object?>(); + } + + static final _id_get$doubleList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getDoubleList', r'()Ljava/util/List;'); + + static final _get$doubleList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getDoubleList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get doubleList { + return _get$doubleList( + reference.pointer, + _id_get$doubleList.pointer, + ).object?>(); + } + + static final _id_get$boolList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getBoolList', r'()Ljava/util/List;'); + + static final _get$boolList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getBoolList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get boolList { + return _get$boolList( + reference.pointer, + _id_get$boolList.pointer, + ).object?>(); + } + + static final _id_get$enumList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getEnumList', r'()Ljava/util/List;'); + + static final _get$enumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getEnumList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get enumList { + return _get$enumList( + reference.pointer, + _id_get$enumList.pointer, + ).object?>(); + } + + static final _id_get$objectList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getObjectList', r'()Ljava/util/List;'); + + static final _get$objectList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getObjectList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get objectList { + return _get$objectList( + reference.pointer, + _id_get$objectList.pointer, + ).object?>(); + } + + static final _id_get$listList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getListList', r'()Ljava/util/List;'); + + static final _get$listList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List> getListList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? get listList { + return _get$listList( + reference.pointer, + _id_get$listList.pointer, + ).object?>?>(); + } + + static final _id_get$mapList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getMapList', r'()Ljava/util/List;'); + + static final _get$mapList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List> getMapList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? get mapList { + return _get$mapList( + reference.pointer, + _id_get$mapList.pointer, + ).object?>?>(); + } + + static final _id_get$map = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getMap', r'()Ljava/util/Map;'); + + static final _get$map = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get map { + return _get$map( + reference.pointer, + _id_get$map.pointer, + ).object?>(); + } + + static final _id_get$stringMap = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getStringMap', r'()Ljava/util/Map;'); + + static final _get$stringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getStringMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get stringMap { + return _get$stringMap( + reference.pointer, + _id_get$stringMap.pointer, + ).object?>(); + } + + static final _id_get$intMap = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getIntMap', r'()Ljava/util/Map;'); + + static final _get$intMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getIntMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get intMap { + return _get$intMap( + reference.pointer, + _id_get$intMap.pointer, + ).object?>(); + } + + static final _id_get$enumMap = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getEnumMap', r'()Ljava/util/Map;'); + + static final _get$enumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getEnumMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get enumMap { + return _get$enumMap( + reference.pointer, + _id_get$enumMap.pointer, + ).object?>(); + } + + static final _id_get$objectMap = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getObjectMap', r'()Ljava/util/Map;'); + + static final _get$objectMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getObjectMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? get objectMap { + return _get$objectMap( + reference.pointer, + _id_get$objectMap.pointer, + ).object?>(); + } + + static final _id_get$listMap = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getListMap', r'()Ljava/util/Map;'); + + static final _get$listMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map> getListMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? get listMap { + return _get$listMap( + reference.pointer, + _id_get$listMap.pointer, + ).object?>?>(); + } + + static final _id_get$mapMap = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getMapMap', r'()Ljava/util/Map;'); + + static final _get$mapMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map> getMapMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + get mapMap { + return _get$mapMap(reference.pointer, _id_get$mapMap.pointer) + .object< + jni$_.JMap?>? + >(); + } + + static final _id_toList = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'toList', r'()Ljava/util/List;'); + + static final _toList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toList(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList( + reference.pointer, + _id_toList.pointer, + ).object>(); + } + + static final _id_equals = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'equals', r'(Ljava/lang/Object;)Z'); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public operator fun equals(other: kotlin.Any?): kotlin.Boolean` + core$_.bool equals(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals.pointer, + _$object.pointer, + ).boolean; + } + + static final _id_hashCode$1 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'hashCode', r'()I'); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_component1 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component1', r'()Ljava/lang/Boolean;'); + + static final _component1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component1(): kotlin.Boolean?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? component1() { + return _component1( + reference.pointer, + _id_component1.pointer, + ).object(); + } + + static final _id_component2 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component2', r'()Ljava/lang/Long;'); + + static final _component2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component2(): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component2() { + return _component2( + reference.pointer, + _id_component2.pointer, + ).object(); + } + + static final _id_component3 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component3', r'()Ljava/lang/Long;'); + + static final _component3 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component3(): kotlin.Long?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component3() { + return _component3( + reference.pointer, + _id_component3.pointer, + ).object(); + } + + static final _id_component4 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component4', r'()Ljava/lang/Double;'); + + static final _component4 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component4(): kotlin.Double?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? component4() { + return _component4( + reference.pointer, + _id_component4.pointer, + ).object(); + } + + static final _id_component5 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component5', r'()[B'); + + static final _component5 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component5(): kotlin.ByteArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? component5() { + return _component5( + reference.pointer, + _id_component5.pointer, + ).object(); + } + + static final _id_component6 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component6', r'()[I'); + + static final _component6 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component6(): kotlin.IntArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? component6() { + return _component6( + reference.pointer, + _id_component6.pointer, + ).object(); + } + + static final _id_component7 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component7', r'()[J'); + + static final _component7 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component7(): kotlin.LongArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? component7() { + return _component7( + reference.pointer, + _id_component7.pointer, + ).object(); + } + + static final _id_component8 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component8', r'()[D'); + + static final _component8 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component8(): kotlin.DoubleArray?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? component8() { + return _component8( + reference.pointer, + _id_component8.pointer, + ).object(); + } + + static final _id_component9 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component9', r'()LNIAnEnum;'); + + static final _component9 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component9(): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? component9() { + return _component9( + reference.pointer, + _id_component9.pointer, + ).object(); + } + + static final _id_component10 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component10', r'()LNIAnotherEnum;'); + + static final _component10 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component10(): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? component10() { + return _component10( + reference.pointer, + _id_component10.pointer, + ).object(); + } + + static final _id_component11 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component11', r'()Ljava/lang/String;'); + + static final _component11 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component11(): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? component11() { + return _component11( + reference.pointer, + _id_component11.pointer, + ).object(); + } + + static final _id_component12 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component12', r'()Ljava/lang/Object;'); + + static final _component12 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component12(): kotlin.Any?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? component12() { + return _component12( + reference.pointer, + _id_component12.pointer, + ).object(); + } + + static final _id_component13 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component13', r'()Ljava/util/List;'); + + static final _component13 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component13(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component13() { + return _component13( + reference.pointer, + _id_component13.pointer, + ).object?>(); + } + + static final _id_component14 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component14', r'()Ljava/util/List;'); + + static final _component14 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component14(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component14() { + return _component14( + reference.pointer, + _id_component14.pointer, + ).object?>(); + } + + static final _id_component15 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component15', r'()Ljava/util/List;'); + + static final _component15 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component15(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component15() { + return _component15( + reference.pointer, + _id_component15.pointer, + ).object?>(); + } + + static final _id_component16 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component16', r'()Ljava/util/List;'); + + static final _component16 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component16(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component16() { + return _component16( + reference.pointer, + _id_component16.pointer, + ).object?>(); + } + + static final _id_component17 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component17', r'()Ljava/util/List;'); + + static final _component17 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component17(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component17() { + return _component17( + reference.pointer, + _id_component17.pointer, + ).object?>(); + } + + static final _id_component18 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component18', r'()Ljava/util/List;'); + + static final _component18 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component18(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component18() { + return _component18( + reference.pointer, + _id_component18.pointer, + ).object?>(); + } + + static final _id_component19 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component19', r'()Ljava/util/List;'); + + static final _component19 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component19(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component19() { + return _component19( + reference.pointer, + _id_component19.pointer, + ).object?>(); + } + + static final _id_component20 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component20', r'()Ljava/util/List;'); + + static final _component20 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component20(): kotlin.collections.List?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component20() { + return _component20( + reference.pointer, + _id_component20.pointer, + ).object?>?>(); + } + + static final _id_component21 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component21', r'()Ljava/util/List;'); + + static final _component21 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component21(): kotlin.collections.List?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component21() { + return _component21( + reference.pointer, + _id_component21.pointer, + ).object?>?>(); + } + + static final _id_component22 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component22', r'()Ljava/util/Map;'); + + static final _component22 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component22(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component22() { + return _component22( + reference.pointer, + _id_component22.pointer, + ).object?>(); + } + + static final _id_component23 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component23', r'()Ljava/util/Map;'); + + static final _component23 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component23(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component23() { + return _component23( + reference.pointer, + _id_component23.pointer, + ).object?>(); + } + + static final _id_component24 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component24', r'()Ljava/util/Map;'); + + static final _component24 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component24(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component24() { + return _component24( + reference.pointer, + _id_component24.pointer, + ).object?>(); + } + + static final _id_component25 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component25', r'()Ljava/util/Map;'); + + static final _component25 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component25(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component25() { + return _component25( + reference.pointer, + _id_component25.pointer, + ).object?>(); + } + + static final _id_component26 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component26', r'()Ljava/util/Map;'); + + static final _component26 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component26(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component26() { + return _component26( + reference.pointer, + _id_component26.pointer, + ).object?>(); + } + + static final _id_component27 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component27', r'()Ljava/util/Map;'); + + static final _component27 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component27(): kotlin.collections.Map?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? component27() { + return _component27( + reference.pointer, + _id_component27.pointer, + ).object?>?>(); + } + + static final _id_component28 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component28', r'()Ljava/util/Map;'); + + static final _component28 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component28(): kotlin.collections.Map?>?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + component28() { + return _component28(reference.pointer, _id_component28.pointer) + .object< + jni$_.JMap?>? + >(); + } + + static final _id_copy = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId( + r'copy', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLNIAnEnum;LNIAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)LNIAllNullableTypesWithoutRecursion;', + ); + + static final _copy = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun copy(aNullableBool: kotlin.Boolean?, aNullableInt: kotlin.Long?, aNullableInt64: kotlin.Long?, aNullableDouble: kotlin.Double?, aNullableByteArray: kotlin.ByteArray?, aNullable4ByteArray: kotlin.IntArray?, aNullable8ByteArray: kotlin.LongArray?, aNullableFloatArray: kotlin.DoubleArray?, aNullableEnum: NIAnEnum?, anotherNullableEnum: NIAnotherEnum?, aNullableString: kotlin.String?, aNullableObject: kotlin.Any?, list: kotlin.collections.List?, stringList: kotlin.collections.List?, intList: kotlin.collections.List?, doubleList: kotlin.collections.List?, boolList: kotlin.collections.List?, enumList: kotlin.collections.List?, objectList: kotlin.collections.List?, listList: kotlin.collections.List?>?, mapList: kotlin.collections.List?>?, map: kotlin.collections.Map?, stringMap: kotlin.collections.Map?, intMap: kotlin.collections.Map?, enumMap: kotlin.collections.Map?, objectMap: kotlin.collections.Map?, listMap: kotlin.collections.Map?>?, mapMap: kotlin.collections.Map?>?): NIAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion copy( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NIAnEnum? nIAnEnum, + NIAnotherEnum? nIAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$nIAnEnum = nIAnEnum?.reference ?? jni$_.jNullReference; + final _$nIAnotherEnum = nIAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy.pointer, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$nIAnEnum.pointer, + _$nIAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + ).object(); + } + + static final _id_toString$1 = NIAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'toString', r'()Ljava/lang/String;'); + + static final _toString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toString(): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1( + reference.pointer, + _id_toString$1.pointer, + ).object(); + } +} + +final class $NIAllNullableTypesWithoutRecursion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAllNullableTypesWithoutRecursion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllNullableTypesWithoutRecursion;'; +} + +/// from: `NIAllClassesWrapper$Companion` +extension type NIAllClassesWrapper$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAllClassesWrapper$Companion'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllClassesWrapper$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllClassesWrapper$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAllClassesWrapper$Companion$$Methods + on NIAllClassesWrapper$Companion { + static final _id_fromList = NIAllClassesWrapper$Companion._class + .instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LNIAllClassesWrapper;', + ); + + static final _fromList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun fromList(pigeonVar_list: kotlin.collections.List): NIAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NIAllClassesWrapper fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NIAllClassesWrapper$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAllClassesWrapper$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllClassesWrapper$Companion;'; +} + +/// from: `NIAllClassesWrapper` +extension type NIAllClassesWrapper._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAllClassesWrapper'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAllClassesWrapper$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIAllClassesWrapper$Companion;', + ); + + /// from: `static public final NIAllClassesWrapper$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIAllClassesWrapper$Companion get Companion => + _id_Companion.get(_class, NIAllClassesWrapper$Companion.type) + as NIAllClassesWrapper$Companion; + + static final _id_new$ = _class.constructorId( + r'(LNIAllNullableTypes;LNIAllNullableTypesWithoutRecursion;LNIAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public void (NIAllNullableTypes nIAllNullableTypes, NIAllNullableTypesWithoutRecursion nIAllNullableTypesWithoutRecursion, NIAllTypes nIAllTypes, java.util.List list, java.util.List list1, java.util.Map map, java.util.Map map1)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllClassesWrapper( + NIAllNullableTypes nIAllNullableTypes, + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + NIAllTypes? nIAllTypes, + jni$_.JList list, + jni$_.JList? list1, + jni$_.JMap map, + jni$_.JMap? map1, + ) { + final _$nIAllNullableTypes = nIAllNullableTypes.reference; + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$nIAllTypes = nIAllTypes?.reference ?? jni$_.jNullReference; + final _$list = list.reference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$map = map.reference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$nIAllNullableTypes.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$nIAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + ).object(); + } + + static final _id_new$1 = _class.constructorId( + r'(LNIAllNullableTypes;LNIAllNullableTypesWithoutRecursion;LNIAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + core$_.int, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (NIAllNullableTypes nIAllNullableTypes, NIAllNullableTypesWithoutRecursion nIAllNullableTypesWithoutRecursion, NIAllTypes nIAllTypes, java.util.List list, java.util.List list1, java.util.Map map, java.util.Map map1, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAllClassesWrapper.new$1( + NIAllNullableTypes? nIAllNullableTypes, + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + NIAllTypes? nIAllTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JMap? map, + jni$_.JMap? map1, + core$_.int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$nIAllNullableTypes = + nIAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$nIAllTypes = nIAllTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$1( + _class.reference.pointer, + _id_new$1.pointer, + _$nIAllNullableTypes.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$nIAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + i, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAllClassesWrapper$$Methods on NIAllClassesWrapper { + static final _id_get$allNullableTypes = NIAllClassesWrapper._class + .instanceMethodId(r'getAllNullableTypes', r'()LNIAllNullableTypes;'); + + static final _get$allNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAllNullableTypes getAllNullableTypes()` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes get allNullableTypes { + return _get$allNullableTypes( + reference.pointer, + _id_get$allNullableTypes.pointer, + ).object(); + } + + static final _id_get$allNullableTypesWithoutRecursion = NIAllClassesWrapper + ._class + .instanceMethodId( + r'getAllNullableTypesWithoutRecursion', + r'()LNIAllNullableTypesWithoutRecursion;', + ); + + static final _get$allNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAllNullableTypesWithoutRecursion getAllNullableTypesWithoutRecursion()` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? get allNullableTypesWithoutRecursion { + return _get$allNullableTypesWithoutRecursion( + reference.pointer, + _id_get$allNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_get$allTypes = NIAllClassesWrapper._class.instanceMethodId( + r'getAllTypes', + r'()LNIAllTypes;', + ); + + static final _get$allTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final NIAllTypes getAllTypes()` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes? get allTypes { + return _get$allTypes( + reference.pointer, + _id_get$allTypes.pointer, + ).object(); + } + + static final _id_get$classList = NIAllClassesWrapper._class.instanceMethodId( + r'getClassList', + r'()Ljava/util/List;', + ); + + static final _get$classList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getClassList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList get classList { + return _get$classList( + reference.pointer, + _id_get$classList.pointer, + ).object>(); + } + + static final _id_get$nullableClassList = NIAllClassesWrapper._class + .instanceMethodId(r'getNullableClassList', r'()Ljava/util/List;'); + + static final _get$nullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.List getNullableClassList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? get nullableClassList { + return _get$nullableClassList( + reference.pointer, + _id_get$nullableClassList.pointer, + ).object?>(); + } + + static final _id_get$classMap = NIAllClassesWrapper._class.instanceMethodId( + r'getClassMap', + r'()Ljava/util/Map;', + ); + + static final _get$classMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getClassMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap get classMap { + return _get$classMap( + reference.pointer, + _id_get$classMap.pointer, + ).object>(); + } + + static final _id_get$nullableClassMap = NIAllClassesWrapper._class + .instanceMethodId(r'getNullableClassMap', r'()Ljava/util/Map;'); + + static final _get$nullableClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final java.util.Map getNullableClassMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + get nullableClassMap { + return _get$nullableClassMap( + reference.pointer, + _id_get$nullableClassMap.pointer, + ).object?>(); + } + + static final _id_toList = NIAllClassesWrapper._class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toList(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList( + reference.pointer, + _id_toList.pointer, + ).object>(); + } + + static final _id_equals = NIAllClassesWrapper._class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public operator fun equals(other: kotlin.Any?): kotlin.Boolean` + core$_.bool equals(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals( + reference.pointer, + _id_equals.pointer, + _$object.pointer, + ).boolean; + } + + static final _id_hashCode$1 = NIAllClassesWrapper._class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_component1 = NIAllClassesWrapper._class.instanceMethodId( + r'component1', + r'()LNIAllNullableTypes;', + ); + + static final _component1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component1(): NIAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypes component1() { + return _component1( + reference.pointer, + _id_component1.pointer, + ).object(); + } + + static final _id_component2 = NIAllClassesWrapper._class.instanceMethodId( + r'component2', + r'()LNIAllNullableTypesWithoutRecursion;', + ); + + static final _component2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component2(): NIAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NIAllNullableTypesWithoutRecursion? component2() { + return _component2( + reference.pointer, + _id_component2.pointer, + ).object(); + } + + static final _id_component3 = NIAllClassesWrapper._class.instanceMethodId( + r'component3', + r'()LNIAllTypes;', + ); + + static final _component3 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component3(): NIAllTypes?` + /// The returned object must be released after use, by calling the [release] method. + NIAllTypes? component3() { + return _component3( + reference.pointer, + _id_component3.pointer, + ).object(); + } + + static final _id_component4 = NIAllClassesWrapper._class.instanceMethodId( + r'component4', + r'()Ljava/util/List;', + ); + + static final _component4 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component4(): kotlin.collections.List` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component4() { + return _component4( + reference.pointer, + _id_component4.pointer, + ).object>(); + } + + static final _id_component5 = NIAllClassesWrapper._class.instanceMethodId( + r'component5', + r'()Ljava/util/List;', + ); + + static final _component5 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component5(): kotlin.collections.List?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component5() { + return _component5( + reference.pointer, + _id_component5.pointer, + ).object?>(); + } + + static final _id_component6 = NIAllClassesWrapper._class.instanceMethodId( + r'component6', + r'()Ljava/util/Map;', + ); + + static final _component6 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component6(): kotlin.collections.Map` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component6() { + return _component6( + reference.pointer, + _id_component6.pointer, + ).object>(); + } + + static final _id_component7 = NIAllClassesWrapper._class.instanceMethodId( + r'component7', + r'()Ljava/util/Map;', + ); + + static final _component7 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public operator fun component7(): kotlin.collections.Map?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component7() { + return _component7( + reference.pointer, + _id_component7.pointer, + ).object?>(); + } + + static final _id_copy = NIAllClassesWrapper._class.instanceMethodId( + r'copy', + r'(LNIAllNullableTypes;LNIAllNullableTypesWithoutRecursion;LNIAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)LNIAllClassesWrapper;', + ); + + static final _copy = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + ) + >(); + + /// from: `public fun copy(allNullableTypes: NIAllNullableTypes, allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursion?, allTypes: NIAllTypes?, classList: kotlin.collections.List, nullableClassList: kotlin.collections.List?, classMap: kotlin.collections.Map, nullableClassMap: kotlin.collections.Map?): NIAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NIAllClassesWrapper copy( + NIAllNullableTypes nIAllNullableTypes, + NIAllNullableTypesWithoutRecursion? nIAllNullableTypesWithoutRecursion, + NIAllTypes? nIAllTypes, + jni$_.JList list, + jni$_.JList? list1, + jni$_.JMap map, + jni$_.JMap? map1, + ) { + final _$nIAllNullableTypes = nIAllNullableTypes.reference; + final _$nIAllNullableTypesWithoutRecursion = + nIAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$nIAllTypes = nIAllTypes?.reference ?? jni$_.jNullReference; + final _$list = list.reference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$map = map.reference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy.pointer, + _$nIAllNullableTypes.pointer, + _$nIAllNullableTypesWithoutRecursion.pointer, + _$nIAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + ).object(); + } + + static final _id_toString$1 = NIAllClassesWrapper._class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public fun toString(): kotlin.String` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1( + reference.pointer, + _id_toString$1.pointer, + ).object(); + } +} + +final class $NIAllClassesWrapper$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAllClassesWrapper$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAllClassesWrapper;'; +} + +/// from: `NIAnEnum$Companion` +extension type NIAnEnum$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAnEnum$Companion'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAnEnum$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAnEnum$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAnEnum$Companion$$Methods on NIAnEnum$Companion { + static final _id_ofRaw = NIAnEnum$Companion._class.instanceMethodId( + r'ofRaw', + r'(I)LNIAnEnum;', + ); + + static final _ofRaw = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun ofRaw(raw: kotlin.Int): NIAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnEnum? ofRaw(core$_.int i) { + return _ofRaw(reference.pointer, _id_ofRaw.pointer, i).object(); + } +} + +final class $NIAnEnum$Companion$Type$ extends jni$_.JType { + @jni$_.internal + const $NIAnEnum$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAnEnum$Companion;'; +} + +/// from: `NIAnEnum` +extension type NIAnEnum._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAnEnum'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NIAnEnum$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIAnEnum$Companion;', + ); + + /// from: `static public final NIAnEnum$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum$Companion get Companion => + _id_Companion.get(_class, NIAnEnum$Companion.type) as NIAnEnum$Companion; + + static final _id_ONE = _class.staticFieldId(r'ONE', r'LNIAnEnum;'); + + /// from: `static public final NIAnEnum ONE` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum get ONE => _id_ONE.get(_class, NIAnEnum.type) as NIAnEnum; + + static final _id_TWO = _class.staticFieldId(r'TWO', r'LNIAnEnum;'); + + /// from: `static public final NIAnEnum TWO` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum get TWO => _id_TWO.get(_class, NIAnEnum.type) as NIAnEnum; + + static final _id_THREE = _class.staticFieldId(r'THREE', r'LNIAnEnum;'); + + /// from: `static public final NIAnEnum THREE` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum get THREE => _id_THREE.get(_class, NIAnEnum.type) as NIAnEnum; + + static final _id_FORTY_TWO = _class.staticFieldId( + r'FORTY_TWO', + r'LNIAnEnum;', + ); + + /// from: `static public final NIAnEnum FORTY_TWO` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum get FORTY_TWO => + _id_FORTY_TWO.get(_class, NIAnEnum.type) as NIAnEnum; + + static final _id_FOUR_HUNDRED_TWENTY_TWO = _class.staticFieldId( + r'FOUR_HUNDRED_TWENTY_TWO', + r'LNIAnEnum;', + ); + + /// from: `static public final NIAnEnum FOUR_HUNDRED_TWENTY_TWO` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum get FOUR_HUNDRED_TWENTY_TWO => + _id_FOUR_HUNDRED_TWENTY_TWO.get(_class, NIAnEnum.type) as NIAnEnum; + + static final _id_values = _class.staticMethodId(r'values', r'()[LNIAnEnum;'); + + static final _values = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `static public NIAnEnum[] values()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JArray? values() { + return _values( + _class.reference.pointer, + _id_values.pointer, + ).object?>(); + } + + static final _id_valueOf = _class.staticMethodId( + r'valueOf', + r'(Ljava/lang/String;)LNIAnEnum;', + ); + + static final _valueOf = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `static public NIAnEnum valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static NIAnEnum? valueOf(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _valueOf( + _class.reference.pointer, + _id_valueOf.pointer, + _$string.pointer, + ).object(); + } + + static final _id_get$entries = _class.staticMethodId( + r'getEntries', + r'()Lkotlin/enums/EnumEntries;', + ); + + static final _get$entries = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `static public kotlin.enums.EnumEntries getEntries()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject get entries { + return _get$entries( + _class.reference.pointer, + _id_get$entries.pointer, + ).object(); + } +} + +extension NIAnEnum$$Methods on NIAnEnum { + static final _id_get$raw = NIAnEnum._class.instanceMethodId( + r'getRaw', + r'()I', + ); + + static final _get$raw = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final int getRaw()` + core$_.int get raw { + return _get$raw(reference.pointer, _id_get$raw.pointer).integer; + } +} + +final class $NIAnEnum$Type$ extends jni$_.JType { + @jni$_.internal + const $NIAnEnum$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAnEnum;'; +} + +/// from: `NIAnotherEnum$Companion` +extension type NIAnotherEnum$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAnotherEnum$Companion'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NIAnotherEnum$Companion$Type$(); + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory NIAnotherEnum$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NIAnotherEnum$Companion$$Methods on NIAnotherEnum$Companion { + static final _id_ofRaw = NIAnotherEnum$Companion._class.instanceMethodId( + r'ofRaw', + r'(I)LNIAnotherEnum;', + ); + + static final _ofRaw = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + core$_.int, + ) + >(); + + /// from: `public fun ofRaw(raw: kotlin.Int): NIAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NIAnotherEnum? ofRaw(core$_.int i) { + return _ofRaw( + reference.pointer, + _id_ofRaw.pointer, + i, + ).object(); + } +} + +final class $NIAnotherEnum$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NIAnotherEnum$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAnotherEnum$Companion;'; +} + +/// from: `NIAnotherEnum` +extension type NIAnotherEnum._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'NIAnotherEnum'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NIAnotherEnum$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LNIAnotherEnum$Companion;', + ); + + /// from: `static public final NIAnotherEnum$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NIAnotherEnum$Companion get Companion => + _id_Companion.get(_class, NIAnotherEnum$Companion.type) + as NIAnotherEnum$Companion; + + static final _id_JUST_IN_CASE = _class.staticFieldId( + r'JUST_IN_CASE', + r'LNIAnotherEnum;', + ); + + /// from: `static public final NIAnotherEnum JUST_IN_CASE` + /// The returned object must be released after use, by calling the [release] method. + static NIAnotherEnum get JUST_IN_CASE => + _id_JUST_IN_CASE.get(_class, NIAnotherEnum.type) as NIAnotherEnum; + + static final _id_values = _class.staticMethodId( + r'values', + r'()[LNIAnotherEnum;', + ); + + static final _values = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `static public NIAnotherEnum[] values()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JArray? values() { + return _values( + _class.reference.pointer, + _id_values.pointer, + ).object?>(); + } + + static final _id_valueOf = _class.staticMethodId( + r'valueOf', + r'(Ljava/lang/String;)LNIAnotherEnum;', + ); + + static final _valueOf = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `static public NIAnotherEnum valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static NIAnotherEnum? valueOf(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _valueOf( + _class.reference.pointer, + _id_valueOf.pointer, + _$string.pointer, + ).object(); + } + + static final _id_get$entries = _class.staticMethodId( + r'getEntries', + r'()Lkotlin/enums/EnumEntries;', + ); + + static final _get$entries = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `static public kotlin.enums.EnumEntries getEntries()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject get entries { + return _get$entries( + _class.reference.pointer, + _id_get$entries.pointer, + ).object(); + } +} + +extension NIAnotherEnum$$Methods on NIAnotherEnum { + static final _id_get$raw = NIAnotherEnum._class.instanceMethodId( + r'getRaw', + r'()I', + ); + + static final _get$raw = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + > + >('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + ) + >(); + + /// from: `public final int getRaw()` + core$_.int get raw { + return _get$raw(reference.pointer, _id_get$raw.pointer).integer; + } +} + +final class $NIAnotherEnum$Type$ extends jni$_.JType { + @jni$_.internal + const $NIAnotherEnum$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'LNIAnotherEnum;'; +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart index e551956e8091..49071428b22a 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -151,6 +150,11 @@ class NonNullFieldSearchRequest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class ExtraData { @@ -192,6 +196,11 @@ class ExtraData { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class NonNullFieldSearchReply { @@ -251,6 +260,11 @@ class NonNullFieldSearchReply { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -296,8 +310,8 @@ class _PigeonCodec extends StandardMessageCodec { } class NonNullFieldHostApi { - /// Constructor for [NonNullFieldHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [NonNullFieldHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NonNullFieldHostApi({ BinaryMessenger? binaryMessenger, @@ -306,8 +320,8 @@ class NonNullFieldHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart index 6dbbbad8c197..0c5a43bff947 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -156,6 +155,11 @@ class NullFieldsSearchRequest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class NullFieldsSearchReply { @@ -215,6 +219,11 @@ class NullFieldsSearchReply { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => _deepHash([runtimeType, ..._toList()]); + + @override + String toString() { + return _toList().toString(); + } } class _PigeonCodec extends StandardMessageCodec { @@ -255,8 +264,8 @@ class _PigeonCodec extends StandardMessageCodec { } class NullFieldsHostApi { - /// Constructor for [NullFieldsHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [NullFieldsHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NullFieldsHostApi({ BinaryMessenger? binaryMessenger, @@ -265,8 +274,8 @@ class NullFieldsHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/nullable_returns.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/nullable_returns.gen.dart index a54434311c5e..7473870502be 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/nullable_returns.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/nullable_returns.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -74,8 +73,8 @@ class _PigeonCodec extends StandardMessageCodec { } class NullableReturnHostApi { - /// Constructor for [NullableReturnHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [NullableReturnHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NullableReturnHostApi({ BinaryMessenger? binaryMessenger, @@ -84,8 +83,8 @@ class NullableReturnHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; @@ -150,8 +149,8 @@ abstract class NullableReturnFlutterApi { } class NullableArgHostApi { - /// Constructor for [NullableArgHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [NullableArgHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NullableArgHostApi({ BinaryMessenger? binaryMessenger, @@ -160,8 +159,8 @@ class NullableArgHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; @@ -230,8 +229,8 @@ abstract class NullableArgFlutterApi { } class NullableCollectionReturnHostApi { - /// Constructor for [NullableCollectionReturnHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [NullableCollectionReturnHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NullableCollectionReturnHostApi({ BinaryMessenger? binaryMessenger, @@ -240,8 +239,8 @@ class NullableCollectionReturnHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; @@ -306,8 +305,8 @@ abstract class NullableCollectionReturnFlutterApi { } class NullableCollectionArgHostApi { - /// Constructor for [NullableCollectionArgHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [NullableCollectionArgHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NullableCollectionArgHostApi({ BinaryMessenger? binaryMessenger, @@ -316,8 +315,8 @@ class NullableCollectionArgHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/primitive.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/primitive.gen.dart index 8dfe854ad227..63ef33a58c56 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/primitive.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/primitive.gen.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; @@ -74,8 +73,8 @@ class _PigeonCodec extends StandardMessageCodec { } class PrimitiveHostApi { - /// Constructor for [PrimitiveHostApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default + /// Constructor for [PrimitiveHostApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. PrimitiveHostApi({ BinaryMessenger? binaryMessenger, @@ -84,8 +83,8 @@ class PrimitiveHostApi { pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart index 16ea40c4e399..4ffde80c11a4 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart @@ -10,7 +10,6 @@ import 'dart:async'; import 'dart:io' show Platform; import 'dart:typed_data' show Float64List, Int32List, Int64List; - import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart' show WidgetsFlutterBinding; import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml b/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml index eb4825f64344..1f6ad401e95b 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml @@ -9,6 +9,11 @@ environment: dependencies: build_runner: ^2.1.10 + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 flutter: sdk: flutter # These are normal dependencies rather than dev_dependencies because the @@ -18,8 +23,40 @@ dependencies: sdk: flutter integration_test: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 meta: ^1.17.0 mockito: ^5.4.4 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 dev_dependencies: leak_tracker: any + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 \ No newline at end of file diff --git a/packages/pigeon/platform_tests/test_plugin/android/build.gradle.kts b/packages/pigeon/platform_tests/test_plugin/android/build.gradle.kts index 284efe74ecb6..deb7eb53f6c7 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/build.gradle.kts +++ b/packages/pigeon/platform_tests/test_plugin/android/build.gradle.kts @@ -4,7 +4,7 @@ group = "com.example.test_plugin" version = "1.0-SNAPSHOT" buildscript { - val kotlinVersion = "2.3.0" + val kotlin_version = "2.1.0" repositories { google() mavenCentral() @@ -12,7 +12,7 @@ buildscript { dependencies { classpath("com.android.tools.build:gradle:8.13.1") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") } } @@ -75,6 +75,6 @@ android { testImplementation("io.mockk:mockk:1.14.9") // org.jetbrains.kotlin:kotlin-bom artifact purpose is to align kotlin stdlib and related code versions. // See: https://youtrack.jetbrains.com/issue/KT-55297/kotlin-stdlib-should-declare-constraints-on-kotlin-stdlib-jdk8-and-kotlin-stdlib-jdk7 - implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.3.10")) + implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.1.0")) } } diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore index bbe6aef544f5..dd52dd6f3ceb 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore @@ -5,9 +5,10 @@ !TestPlugin.kt !CoreTests.gen.kt # This contains the declaration of the test classes wrapped by the ProxyApi tests and the -# implemetations of their APIs. +# implementations of their APIs. !ProxyApiTestApiImpls.kt # Including these makes it easier to review code generation changes. !ProxyApiTests.gen.kt !EventChannelTests.gen.kt +!NiTests.gen.kt \ No newline at end of file diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/NiTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/NiTests.gen.kt new file mode 100644 index 000000000000..422e2abd332b --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/NiTests.gen.kt @@ -0,0 +1,4452 @@ +// 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, do not edit directly. +// See also: https://pub.dev/packages/pigeon +@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") + +import android.util.Log +import androidx.annotation.Keep +import io.flutter.plugin.common.StandardMessageCodec +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer + +private object NiTestsPigeonUtils { + + fun createConnectionError(channelName: String): NiTestsError { + return NiTestsError( + "channel-error", "Unable to establish connection on channel: '$channelName'.", "") + } + + fun wrapResult(result: Any?): List { + return listOf(result) + } + + fun wrapError(exception: Throwable): List { + return if (exception is NiTestsError) { + listOf(exception.code, exception.message, exception.details) + } else { + listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception)) + } + } + + fun doubleEquals(a: Double, b: Double): Boolean { + // Normalize -0.0 to 0.0 and handle NaN equality. + return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN()) + } + + fun floatEquals(a: Float, b: Float): Boolean { + // Normalize -0.0 to 0.0 and handle NaN equality. + return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN()) + } + + fun doubleHash(d: Double): Int { + // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. + val normalized = if (d == 0.0) 0.0 else d + val bits = java.lang.Double.doubleToLongBits(normalized) + return (bits xor (bits ushr 32)).toInt() + } + + fun floatHash(f: Float): Int { + // Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes. + val normalized = if (f == 0.0f) 0.0f else f + return java.lang.Float.floatToIntBits(normalized) + } + + fun deepEquals(a: Any?, b: Any?): Boolean { + if (a === b) { + return true + } + if (a == null || b == null) { + return false + } + 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) { + if (a.size != b.size) return false + for (i in a.indices) { + if (!doubleEquals(a[i], b[i])) return false + } + return true + } + if (a is FloatArray && b is FloatArray) { + if (a.size != b.size) return false + for (i in a.indices) { + if (!floatEquals(a[i], b[i])) return false + } + return true + } + if (a is Array<*> && b is Array<*>) { + if (a.size != b.size) return false + for (i in a.indices) { + if (!deepEquals(a[i], b[i])) return false + } + return true + } + if (a is List<*> && b is List<*>) { + if (a.size != b.size) return false + val iterA = a.iterator() + val iterB = b.iterator() + while (iterA.hasNext() && iterB.hasNext()) { + if (!deepEquals(iterA.next(), iterB.next())) return false + } + return true + } + if (a is Map<*, *> && b is Map<*, *>) { + if (a.size != b.size) return false + for (entry in a) { + val key = entry.key + var found = false + for (bEntry in b) { + if (deepEquals(key, bEntry.key)) { + if (deepEquals(entry.value, bEntry.value)) { + found = true + break + } else { + return false + } + } + } + if (!found) return false + } + return true + } + if (a is Double && b is Double) { + return doubleEquals(a, b) + } + if (a is Float && b is Float) { + return floatEquals(a, b) + } + return a == b + } + + fun deepHash(value: Any?): Int { + return when (value) { + null -> 0 + is ByteArray -> value.contentHashCode() + is IntArray -> value.contentHashCode() + is LongArray -> value.contentHashCode() + is DoubleArray -> { + var result = 1 + for (item in value) { + result = 31 * result + doubleHash(item) + } + result + } + is FloatArray -> { + var result = 1 + for (item in value) { + result = 31 * result + floatHash(item) + } + result + } + is Array<*> -> { + var result = 1 + for (item in value) { + result = 31 * result + deepHash(item) + } + result + } + is List<*> -> { + var result = 1 + for (item in value) { + result = 31 * result + deepHash(item) + } + result + } + is Map<*, *> -> { + var result = 0 + for (entry in value) { + result += ((deepHash(entry.key) * 31) xor deepHash(entry.value)) + } + result + } + is Double -> doubleHash(value) + is Float -> floatHash(value) + else -> value.hashCode() + } + } +} + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class NiTestsError( + val code: String, + override val message: String? = null, + val details: Any? = null +) : Throwable() + +const val defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + +enum class NIAnEnum(val raw: Int) { + ONE(0), + TWO(1), + THREE(2), + FORTY_TWO(3), + FOUR_HUNDRED_TWENTY_TWO(4); + + companion object { + fun ofRaw(raw: Int): NIAnEnum? { + return values().firstOrNull { it.raw == raw } + } + } +} + +enum class NIAnotherEnum(val raw: Int) { + JUST_IN_CASE(0); + + companion object { + fun ofRaw(raw: Int): NIAnotherEnum? { + return values().firstOrNull { it.raw == raw } + } + } +} + +/** Generated class from Pigeon that represents data sent in messages. */ +data class NIUnusedClass(val aField: Any? = null) { + companion object { + fun fromList(pigeonVar_list: List): NIUnusedClass { + val aField = pigeonVar_list[0] + return NIUnusedClass(aField) + } + } + + fun toList(): List { + return listOf( + aField, + ) + } + + override fun equals(other: Any?): Boolean { + if (other == null || other.javaClass != javaClass) { + return false + } + if (this === other) { + return true + } + val other = other as NIUnusedClass + return NiTestsPigeonUtils.deepEquals(this.aField, other.aField) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aField) + return result + } +} + +/** + * A class containing all supported types. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NIAllTypes( + val aBool: Boolean, + val anInt: Long, + val anInt64: Long, + val aDouble: Double, + val aByteArray: ByteArray, + val a4ByteArray: IntArray, + val a8ByteArray: LongArray, + val aFloatArray: DoubleArray, + val anEnum: NIAnEnum, + val anotherEnum: NIAnotherEnum, + val aString: String, + val anObject: Any, + val list: List, + val stringList: List, + val intList: List, + val doubleList: List, + val boolList: List, + val enumList: List, + val objectList: List, + val listList: List>, + val mapList: List>, + val map: Map, + val stringMap: Map, + val intMap: Map, + val enumMap: Map, + val objectMap: Map, + val listMap: Map>, + val mapMap: Map> +) { + companion object { + fun fromList(pigeonVar_list: List): NIAllTypes { + val aBool = pigeonVar_list[0] as Boolean + val anInt = pigeonVar_list[1] as Long + val anInt64 = pigeonVar_list[2] as Long + val aDouble = pigeonVar_list[3] as Double + val aByteArray = pigeonVar_list[4] as ByteArray + val a4ByteArray = pigeonVar_list[5] as IntArray + val a8ByteArray = pigeonVar_list[6] as LongArray + val aFloatArray = pigeonVar_list[7] as DoubleArray + val anEnum = pigeonVar_list[8] as NIAnEnum + val anotherEnum = pigeonVar_list[9] as NIAnotherEnum + val aString = pigeonVar_list[10] as String + val anObject = pigeonVar_list[11] as Any + val list = pigeonVar_list[12] as List + val stringList = pigeonVar_list[13] as List + val intList = pigeonVar_list[14] as List + val doubleList = pigeonVar_list[15] as List + val boolList = pigeonVar_list[16] as List + val enumList = pigeonVar_list[17] as List + val objectList = pigeonVar_list[18] as List + val listList = pigeonVar_list[19] as List> + val mapList = pigeonVar_list[20] as List> + val map = pigeonVar_list[21] as Map + val stringMap = pigeonVar_list[22] as Map + val intMap = pigeonVar_list[23] as Map + val enumMap = pigeonVar_list[24] as Map + val objectMap = pigeonVar_list[25] as Map + val listMap = pigeonVar_list[26] as Map> + val mapMap = pigeonVar_list[27] as Map> + return NIAllTypes( + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap) + } + } + + fun toList(): List { + return listOf( + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other == null || other.javaClass != javaClass) { + return false + } + if (this === other) { + return true + } + val other = other as NIAllTypes + return NiTestsPigeonUtils.deepEquals(this.aBool, other.aBool) && + NiTestsPigeonUtils.deepEquals(this.anInt, other.anInt) && + NiTestsPigeonUtils.deepEquals(this.anInt64, other.anInt64) && + NiTestsPigeonUtils.deepEquals(this.aDouble, other.aDouble) && + NiTestsPigeonUtils.deepEquals(this.aByteArray, other.aByteArray) && + NiTestsPigeonUtils.deepEquals(this.a4ByteArray, other.a4ByteArray) && + NiTestsPigeonUtils.deepEquals(this.a8ByteArray, other.a8ByteArray) && + NiTestsPigeonUtils.deepEquals(this.aFloatArray, other.aFloatArray) && + NiTestsPigeonUtils.deepEquals(this.anEnum, other.anEnum) && + NiTestsPigeonUtils.deepEquals(this.anotherEnum, other.anotherEnum) && + NiTestsPigeonUtils.deepEquals(this.aString, other.aString) && + NiTestsPigeonUtils.deepEquals(this.anObject, other.anObject) && + NiTestsPigeonUtils.deepEquals(this.list, other.list) && + NiTestsPigeonUtils.deepEquals(this.stringList, other.stringList) && + NiTestsPigeonUtils.deepEquals(this.intList, other.intList) && + NiTestsPigeonUtils.deepEquals(this.doubleList, other.doubleList) && + NiTestsPigeonUtils.deepEquals(this.boolList, other.boolList) && + NiTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && + NiTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && + NiTestsPigeonUtils.deepEquals(this.listList, other.listList) && + NiTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + NiTestsPigeonUtils.deepEquals(this.map, other.map) && + NiTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && + NiTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && + NiTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && + NiTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && + NiTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + NiTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aBool) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anInt) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anInt64) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aDouble) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.a4ByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.a8ByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aFloatArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anEnum) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anotherEnum) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aString) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anObject) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.list) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.stringList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.intList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.doubleList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.boolList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.enumList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.objectList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.map) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.stringMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.intMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.enumMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.objectMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.mapMap) + return result + } +} + +/** + * A class containing all supported nullable types. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NIAllNullableTypes( + val aNullableBool: Boolean? = null, + val aNullableInt: Long? = null, + val aNullableInt64: Long? = null, + val aNullableDouble: Double? = null, + val aNullableByteArray: ByteArray? = null, + val aNullable4ByteArray: IntArray? = null, + val aNullable8ByteArray: LongArray? = null, + val aNullableFloatArray: DoubleArray? = null, + val aNullableEnum: NIAnEnum? = null, + val anotherNullableEnum: NIAnotherEnum? = null, + val aNullableString: String? = null, + val aNullableObject: Any? = null, + val allNullableTypes: NIAllNullableTypes? = null, + val list: List? = null, + val stringList: List? = null, + val intList: List? = null, + val doubleList: List? = null, + val boolList: List? = null, + val enumList: List? = null, + val objectList: List? = null, + val listList: List?>? = null, + val mapList: List?>? = null, + val recursiveClassList: List? = null, + val map: Map? = null, + val stringMap: Map? = null, + val intMap: Map? = null, + val enumMap: Map? = null, + val objectMap: Map? = null, + val listMap: Map?>? = null, + val mapMap: Map?>? = null, + val recursiveClassMap: Map? = null +) { + companion object { + fun fromList(pigeonVar_list: List): NIAllNullableTypes { + val aNullableBool = pigeonVar_list[0] as Boolean? + val aNullableInt = pigeonVar_list[1] as Long? + val aNullableInt64 = pigeonVar_list[2] as Long? + val aNullableDouble = pigeonVar_list[3] as Double? + val aNullableByteArray = pigeonVar_list[4] as ByteArray? + val aNullable4ByteArray = pigeonVar_list[5] as IntArray? + val aNullable8ByteArray = pigeonVar_list[6] as LongArray? + val aNullableFloatArray = pigeonVar_list[7] as DoubleArray? + val aNullableEnum = pigeonVar_list[8] as NIAnEnum? + val anotherNullableEnum = pigeonVar_list[9] as NIAnotherEnum? + val aNullableString = pigeonVar_list[10] as String? + val aNullableObject = pigeonVar_list[11] + val allNullableTypes = pigeonVar_list[12] as NIAllNullableTypes? + val list = pigeonVar_list[13] as List? + val stringList = pigeonVar_list[14] as List? + val intList = pigeonVar_list[15] as List? + val doubleList = pigeonVar_list[16] as List? + val boolList = pigeonVar_list[17] as List? + val enumList = pigeonVar_list[18] as List? + val objectList = pigeonVar_list[19] as List? + val listList = pigeonVar_list[20] as List?>? + val mapList = pigeonVar_list[21] as List?>? + val recursiveClassList = pigeonVar_list[22] as List? + val map = pigeonVar_list[23] as Map? + val stringMap = pigeonVar_list[24] as Map? + val intMap = pigeonVar_list[25] as Map? + val enumMap = pigeonVar_list[26] as Map? + val objectMap = pigeonVar_list[27] as Map? + val listMap = pigeonVar_list[28] as Map?>? + val mapMap = pigeonVar_list[29] as Map?>? + val recursiveClassMap = pigeonVar_list[30] as Map? + return NIAllNullableTypes( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap) + } + } + + fun toList(): List { + return listOf( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other == null || other.javaClass != javaClass) { + return false + } + if (this === other) { + return true + } + val other = other as NIAllNullableTypes + return NiTestsPigeonUtils.deepEquals(this.aNullableBool, other.aNullableBool) && + NiTestsPigeonUtils.deepEquals(this.aNullableInt, other.aNullableInt) && + NiTestsPigeonUtils.deepEquals(this.aNullableInt64, other.aNullableInt64) && + NiTestsPigeonUtils.deepEquals(this.aNullableDouble, other.aNullableDouble) && + NiTestsPigeonUtils.deepEquals(this.aNullableByteArray, other.aNullableByteArray) && + NiTestsPigeonUtils.deepEquals(this.aNullable4ByteArray, other.aNullable4ByteArray) && + NiTestsPigeonUtils.deepEquals(this.aNullable8ByteArray, other.aNullable8ByteArray) && + NiTestsPigeonUtils.deepEquals(this.aNullableFloatArray, other.aNullableFloatArray) && + NiTestsPigeonUtils.deepEquals(this.aNullableEnum, other.aNullableEnum) && + NiTestsPigeonUtils.deepEquals(this.anotherNullableEnum, other.anotherNullableEnum) && + NiTestsPigeonUtils.deepEquals(this.aNullableString, other.aNullableString) && + NiTestsPigeonUtils.deepEquals(this.aNullableObject, other.aNullableObject) && + NiTestsPigeonUtils.deepEquals(this.allNullableTypes, other.allNullableTypes) && + NiTestsPigeonUtils.deepEquals(this.list, other.list) && + NiTestsPigeonUtils.deepEquals(this.stringList, other.stringList) && + NiTestsPigeonUtils.deepEquals(this.intList, other.intList) && + NiTestsPigeonUtils.deepEquals(this.doubleList, other.doubleList) && + NiTestsPigeonUtils.deepEquals(this.boolList, other.boolList) && + NiTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && + NiTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && + NiTestsPigeonUtils.deepEquals(this.listList, other.listList) && + NiTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + NiTestsPigeonUtils.deepEquals(this.recursiveClassList, other.recursiveClassList) && + NiTestsPigeonUtils.deepEquals(this.map, other.map) && + NiTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && + NiTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && + NiTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && + NiTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && + NiTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + NiTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) && + NiTestsPigeonUtils.deepEquals(this.recursiveClassMap, other.recursiveClassMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableBool) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableInt) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableInt64) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableDouble) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullable4ByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullable8ByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableFloatArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableEnum) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anotherNullableEnum) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableString) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableObject) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.allNullableTypes) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.list) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.stringList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.intList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.doubleList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.boolList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.enumList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.objectList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.recursiveClassList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.map) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.stringMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.intMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.enumMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.objectMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.mapMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.recursiveClassMap) + return result + } +} + +/** + * The primary purpose for this class is to ensure coverage of Swift structs with nullable items, as + * the primary [NIAllNullableTypes] class is being used to test Swift classes. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NIAllNullableTypesWithoutRecursion( + val aNullableBool: Boolean? = null, + val aNullableInt: Long? = null, + val aNullableInt64: Long? = null, + val aNullableDouble: Double? = null, + val aNullableByteArray: ByteArray? = null, + val aNullable4ByteArray: IntArray? = null, + val aNullable8ByteArray: LongArray? = null, + val aNullableFloatArray: DoubleArray? = null, + val aNullableEnum: NIAnEnum? = null, + val anotherNullableEnum: NIAnotherEnum? = null, + val aNullableString: String? = null, + val aNullableObject: Any? = null, + val list: List? = null, + val stringList: List? = null, + val intList: List? = null, + val doubleList: List? = null, + val boolList: List? = null, + val enumList: List? = null, + val objectList: List? = null, + val listList: List?>? = null, + val mapList: List?>? = null, + val map: Map? = null, + val stringMap: Map? = null, + val intMap: Map? = null, + val enumMap: Map? = null, + val objectMap: Map? = null, + val listMap: Map?>? = null, + val mapMap: Map?>? = null +) { + companion object { + fun fromList(pigeonVar_list: List): NIAllNullableTypesWithoutRecursion { + val aNullableBool = pigeonVar_list[0] as Boolean? + val aNullableInt = pigeonVar_list[1] as Long? + val aNullableInt64 = pigeonVar_list[2] as Long? + val aNullableDouble = pigeonVar_list[3] as Double? + val aNullableByteArray = pigeonVar_list[4] as ByteArray? + val aNullable4ByteArray = pigeonVar_list[5] as IntArray? + val aNullable8ByteArray = pigeonVar_list[6] as LongArray? + val aNullableFloatArray = pigeonVar_list[7] as DoubleArray? + val aNullableEnum = pigeonVar_list[8] as NIAnEnum? + val anotherNullableEnum = pigeonVar_list[9] as NIAnotherEnum? + val aNullableString = pigeonVar_list[10] as String? + val aNullableObject = pigeonVar_list[11] + val list = pigeonVar_list[12] as List? + val stringList = pigeonVar_list[13] as List? + val intList = pigeonVar_list[14] as List? + val doubleList = pigeonVar_list[15] as List? + val boolList = pigeonVar_list[16] as List? + val enumList = pigeonVar_list[17] as List? + val objectList = pigeonVar_list[18] as List? + val listList = pigeonVar_list[19] as List?>? + val mapList = pigeonVar_list[20] as List?>? + val map = pigeonVar_list[21] as Map? + val stringMap = pigeonVar_list[22] as Map? + val intMap = pigeonVar_list[23] as Map? + val enumMap = pigeonVar_list[24] as Map? + val objectMap = pigeonVar_list[25] as Map? + val listMap = pigeonVar_list[26] as Map?>? + val mapMap = pigeonVar_list[27] as Map?>? + return NIAllNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap) + } + } + + fun toList(): List { + return listOf( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other == null || other.javaClass != javaClass) { + return false + } + if (this === other) { + return true + } + val other = other as NIAllNullableTypesWithoutRecursion + return NiTestsPigeonUtils.deepEquals(this.aNullableBool, other.aNullableBool) && + NiTestsPigeonUtils.deepEquals(this.aNullableInt, other.aNullableInt) && + NiTestsPigeonUtils.deepEquals(this.aNullableInt64, other.aNullableInt64) && + NiTestsPigeonUtils.deepEquals(this.aNullableDouble, other.aNullableDouble) && + NiTestsPigeonUtils.deepEquals(this.aNullableByteArray, other.aNullableByteArray) && + NiTestsPigeonUtils.deepEquals(this.aNullable4ByteArray, other.aNullable4ByteArray) && + NiTestsPigeonUtils.deepEquals(this.aNullable8ByteArray, other.aNullable8ByteArray) && + NiTestsPigeonUtils.deepEquals(this.aNullableFloatArray, other.aNullableFloatArray) && + NiTestsPigeonUtils.deepEquals(this.aNullableEnum, other.aNullableEnum) && + NiTestsPigeonUtils.deepEquals(this.anotherNullableEnum, other.anotherNullableEnum) && + NiTestsPigeonUtils.deepEquals(this.aNullableString, other.aNullableString) && + NiTestsPigeonUtils.deepEquals(this.aNullableObject, other.aNullableObject) && + NiTestsPigeonUtils.deepEquals(this.list, other.list) && + NiTestsPigeonUtils.deepEquals(this.stringList, other.stringList) && + NiTestsPigeonUtils.deepEquals(this.intList, other.intList) && + NiTestsPigeonUtils.deepEquals(this.doubleList, other.doubleList) && + NiTestsPigeonUtils.deepEquals(this.boolList, other.boolList) && + NiTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && + NiTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && + NiTestsPigeonUtils.deepEquals(this.listList, other.listList) && + NiTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + NiTestsPigeonUtils.deepEquals(this.map, other.map) && + NiTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && + NiTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && + NiTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && + NiTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && + NiTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + NiTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableBool) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableInt) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableInt64) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableDouble) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullable4ByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullable8ByteArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableFloatArray) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableEnum) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.anotherNullableEnum) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableString) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.aNullableObject) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.list) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.stringList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.intList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.doubleList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.boolList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.enumList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.objectList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.map) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.stringMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.intMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.enumMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.objectMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.mapMap) + return result + } +} + +/** + * A class for testing nested class handling. + * + * This is needed to test nested nullable and non-nullable classes, `NIAllNullableTypes` is + * non-nullable here as it is easier to instantiate than `NIAllTypes` when testing doesn't require + * both (ie. testing null classes). + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NIAllClassesWrapper( + val allNullableTypes: NIAllNullableTypes, + val allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursion? = null, + val allTypes: NIAllTypes? = null, + val classList: List, + val nullableClassList: List? = null, + val classMap: Map, + val nullableClassMap: Map? = null +) { + companion object { + fun fromList(pigeonVar_list: List): NIAllClassesWrapper { + val allNullableTypes = pigeonVar_list[0] as NIAllNullableTypes + val allNullableTypesWithoutRecursion = + pigeonVar_list[1] as NIAllNullableTypesWithoutRecursion? + val allTypes = pigeonVar_list[2] as NIAllTypes? + val classList = pigeonVar_list[3] as List + val nullableClassList = pigeonVar_list[4] as List? + val classMap = pigeonVar_list[5] as Map + val nullableClassMap = pigeonVar_list[6] as Map? + return NIAllClassesWrapper( + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap) + } + } + + fun toList(): List { + return listOf( + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other == null || other.javaClass != javaClass) { + return false + } + if (this === other) { + return true + } + val other = other as NIAllClassesWrapper + return NiTestsPigeonUtils.deepEquals(this.allNullableTypes, other.allNullableTypes) && + NiTestsPigeonUtils.deepEquals( + this.allNullableTypesWithoutRecursion, other.allNullableTypesWithoutRecursion) && + NiTestsPigeonUtils.deepEquals(this.allTypes, other.allTypes) && + NiTestsPigeonUtils.deepEquals(this.classList, other.classList) && + NiTestsPigeonUtils.deepEquals(this.nullableClassList, other.nullableClassList) && + NiTestsPigeonUtils.deepEquals(this.classMap, other.classMap) && + NiTestsPigeonUtils.deepEquals(this.nullableClassMap, other.nullableClassMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NiTestsPigeonUtils.deepHash(this.allNullableTypes) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.allNullableTypesWithoutRecursion) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.allTypes) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.classList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.nullableClassList) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.classMap) + result = 31 * result + NiTestsPigeonUtils.deepHash(this.nullableClassMap) + return result + } +} + +private open class NiTestsPigeonCodec : StandardMessageCodec() { + override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { + return when (type) { + 129.toByte() -> { + return (readValue(buffer) as Long?)?.let { NIAnEnum.ofRaw(it.toInt()) } + } + 130.toByte() -> { + return (readValue(buffer) as Long?)?.let { NIAnotherEnum.ofRaw(it.toInt()) } + } + 131.toByte() -> { + return (readValue(buffer) as? List)?.let { NIUnusedClass.fromList(it) } + } + 132.toByte() -> { + return (readValue(buffer) as? List)?.let { NIAllTypes.fromList(it) } + } + 133.toByte() -> { + return (readValue(buffer) as? List)?.let { NIAllNullableTypes.fromList(it) } + } + 134.toByte() -> { + return (readValue(buffer) as? List)?.let { + NIAllNullableTypesWithoutRecursion.fromList(it) + } + } + 135.toByte() -> { + return (readValue(buffer) as? List)?.let { NIAllClassesWrapper.fromList(it) } + } + else -> super.readValueOfType(type, buffer) + } + } + + override fun writeValue(stream: ByteArrayOutputStream, value: Any?) { + when (value) { + is NIAnEnum -> { + stream.write(129) + writeValue(stream, value.raw.toLong()) + } + is NIAnotherEnum -> { + stream.write(130) + writeValue(stream, value.raw.toLong()) + } + is NIUnusedClass -> { + stream.write(131) + writeValue(stream, value.toList()) + } + is NIAllTypes -> { + stream.write(132) + writeValue(stream, value.toList()) + } + is NIAllNullableTypes -> { + stream.write(133) + writeValue(stream, value.toList()) + } + is NIAllNullableTypesWithoutRecursion -> { + stream.write(134) + writeValue(stream, value.toList()) + } + is NIAllClassesWrapper -> { + stream.write(135) + writeValue(stream, value.toList()) + } + else -> super.writeValue(stream, value) + } + } +} + +val NIHostIntegrationCoreApiInstances: MutableMap = + mutableMapOf() + +@Keep +abstract class NIHostIntegrationCoreApi { + /** A no-op function taking no arguments and returning no value, to sanity test basic calling. */ + abstract fun noop() + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllTypes(everything: NIAllTypes): NIAllTypes + /** Returns an error, to test error handling. */ + abstract fun throwError(): Any? + /** Returns an error from a void function, to test error handling. */ + abstract fun throwErrorFromVoid() + /** Returns a Flutter error, to test error handling. */ + abstract fun throwFlutterError(): Any? + /** Returns passed in int. */ + abstract fun echoInt(anInt: Long): Long + /** Returns passed in double. */ + abstract fun echoDouble(aDouble: Double): Double + /** Returns the passed in boolean. */ + abstract fun echoBool(aBool: Boolean): Boolean + /** Returns the passed in string. */ + abstract fun echoString(aString: String): String + /** Returns the passed in Uint8List. */ + abstract fun echoUint8List(aUint8List: ByteArray): ByteArray + /** Returns the passed in Int32List. */ + abstract fun echoInt32List(aInt32List: IntArray): IntArray + /** Returns the passed in Int64List. */ + abstract fun echoInt64List(aInt64List: LongArray): LongArray + /** Returns the passed in Float64List. */ + abstract fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray + /** Returns the passed in generic Object. */ + abstract fun echoObject(anObject: Any): Any + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoList(list: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoStringList(stringList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoIntList(intList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoDoubleList(doubleList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoBoolList(boolList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoEnumList(enumList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoClassList(classList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNonNullEnumList(enumList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNonNullClassList(classList: List): List + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoMap(map: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoStringMap(stringMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoIntMap(intMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoEnumMap(enumMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoClassMap( + classMap: Map + ): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullStringMap(stringMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullIntMap(intMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullEnumMap(enumMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullClassMap( + classMap: Map + ): Map + /** Returns the passed class to test nested class serialization and deserialization. */ + abstract fun echoClassWrapper(wrapper: NIAllClassesWrapper): NIAllClassesWrapper + /** Returns the passed enum to test serialization and deserialization. */ + abstract fun echoEnum(anEnum: NIAnEnum): NIAnEnum + /** Returns the passed enum to test serialization and deserialization. */ + abstract fun echoAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum + /** Returns the default string. */ + abstract fun echoNamedDefaultString(aString: String): String + /** Returns passed in double. */ + abstract fun echoOptionalDefaultDouble(aDouble: Double): Double + /** Returns passed in int. */ + abstract fun echoRequiredInt(anInt: Long): Long + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes? + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + abstract fun extractNestedNullableString(wrapper: NIAllClassesWrapper): String? + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + abstract fun createNestedNullableString(nullableString: String?): NIAllClassesWrapper + + abstract fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes + + abstract fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion + /** Returns passed in int. */ + abstract fun echoNullableInt(aNullableInt: Long?): Long? + /** Returns passed in double. */ + abstract fun echoNullableDouble(aNullableDouble: Double?): Double? + /** Returns the passed in boolean. */ + abstract fun echoNullableBool(aNullableBool: Boolean?): Boolean? + /** Returns the passed in string. */ + abstract fun echoNullableString(aNullableString: String?): String? + /** Returns the passed in Uint8List. */ + abstract fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? + /** Returns the passed in Int32List. */ + abstract fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? + /** Returns the passed in Int64List. */ + abstract fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? + /** Returns the passed in Float64List. */ + abstract fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? + /** Returns the passed in generic Object. */ + abstract fun echoNullableObject(aNullableObject: Any?): Any? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableList(aNullableList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableEnumList(enumList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableClassList( + classList: List? + ): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableNonNullEnumList(enumList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableNonNullClassList( + classList: List? + ): List? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableMap(map: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableStringMap(stringMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableIntMap(intMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableEnumMap(enumMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableClassMap( + classMap: Map? + ): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullStringMap(stringMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullIntMap(intMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? + + abstract fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? + + abstract fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? + /** Returns passed in int. */ + abstract fun echoOptionalNullableInt(aNullableInt: Long?): Long? + /** Returns the passed in string. */ + abstract fun echoNamedNullableString(aNullableString: String?): String? + /** + * A no-op function taking no arguments and returning no value, to sanity test basic asynchronous + * calling. + */ + abstract suspend fun noopAsync() + /** Returns passed in int asynchronously. */ + abstract suspend fun echoAsyncInt(anInt: Long): Long + /** Returns passed in double asynchronously. */ + abstract suspend fun echoAsyncDouble(aDouble: Double): Double + /** Returns the passed in boolean asynchronously. */ + abstract suspend fun echoAsyncBool(aBool: Boolean): Boolean + /** Returns the passed string asynchronously. */ + abstract suspend fun echoAsyncString(aString: String): String + /** Returns the passed in Uint8List asynchronously. */ + abstract suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray + /** Returns the passed in Int32List asynchronously. */ + abstract suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray + /** Returns the passed in Int64List asynchronously. */ + abstract suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray + /** Returns the passed in Float64List asynchronously. */ + abstract suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray + /** Returns the passed in generic Object asynchronously. */ + abstract suspend fun echoAsyncObject(anObject: Any): Any + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncList(list: List): List + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncEnumList(enumList: List): List + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncClassList( + classList: List + ): List + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncMap(map: Map): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncStringMap(stringMap: Map): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncIntMap(intMap: Map): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncEnumMap( + enumMap: Map + ): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncClassMap( + classMap: Map + ): Map + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum + /** Responds with an error from an async function returning a value. */ + abstract suspend fun throwAsyncError(): Any? + /** Responds with an error from an async void function. */ + abstract suspend fun throwAsyncErrorFromVoid() + /** Responds with a Flutter error from an async function returning a value. */ + abstract suspend fun throwAsyncFlutterError(): Any? + /** Returns the passed object, to test async serialization and deserialization. */ + abstract suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes + /** Returns the passed object, to test serialization and deserialization. */ + abstract suspend fun echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? + /** Returns the passed object, to test serialization and deserialization. */ + abstract suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? + /** Returns passed in int asynchronously. */ + abstract suspend fun echoAsyncNullableInt(anInt: Long?): Long? + /** Returns passed in double asynchronously. */ + abstract suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? + /** Returns the passed in boolean asynchronously. */ + abstract suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? + /** Returns the passed string asynchronously. */ + abstract suspend fun echoAsyncNullableString(aString: String?): String? + /** Returns the passed in Uint8List asynchronously. */ + abstract suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? + /** Returns the passed in Int32List asynchronously. */ + abstract suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? + /** Returns the passed in Int64List asynchronously. */ + abstract suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? + /** Returns the passed in Float64List asynchronously. */ + abstract suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? + /** Returns the passed in generic Object asynchronously. */ + abstract suspend fun echoAsyncNullableObject(anObject: Any?): Any? + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableList(list: List?): List? + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableEnumList(enumList: List?): List? + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableClassList( + classList: List? + ): List? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableMap(map: Map?): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableStringMap( + stringMap: Map? + ): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? + + abstract fun callFlutterNoop() + + abstract fun callFlutterThrowError(): Any? + + abstract fun callFlutterThrowErrorFromVoid() + + abstract fun callFlutterEchoNIAllTypes(everything: NIAllTypes): NIAllTypes + + abstract fun callFlutterEchoNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? + + abstract fun callFlutterSendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes + + abstract fun callFlutterEchoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? + + abstract fun callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion + + abstract fun callFlutterEchoBool(aBool: Boolean): Boolean + + abstract fun callFlutterEchoInt(anInt: Long): Long + + abstract fun callFlutterEchoDouble(aDouble: Double): Double + + abstract fun callFlutterEchoString(aString: String): String + + abstract fun callFlutterEchoUint8List(list: ByteArray): ByteArray + + abstract fun callFlutterEchoInt32List(list: IntArray): IntArray + + abstract fun callFlutterEchoInt64List(list: LongArray): LongArray + + abstract fun callFlutterEchoFloat64List(list: DoubleArray): DoubleArray + + abstract fun callFlutterEchoList(list: List): List + + abstract fun callFlutterEchoEnumList(enumList: List): List + + abstract fun callFlutterEchoClassList( + classList: List + ): List + + abstract fun callFlutterEchoNonNullEnumList(enumList: List): List + + abstract fun callFlutterEchoNonNullClassList( + classList: List + ): List + + abstract fun callFlutterEchoMap(map: Map): Map + + abstract fun callFlutterEchoStringMap(stringMap: Map): Map + + abstract fun callFlutterEchoIntMap(intMap: Map): Map + + abstract fun callFlutterEchoEnumMap(enumMap: Map): Map + + abstract fun callFlutterEchoClassMap( + classMap: Map + ): Map + + abstract fun callFlutterEchoNonNullStringMap(stringMap: Map): Map + + abstract fun callFlutterEchoNonNullIntMap(intMap: Map): Map + + abstract fun callFlutterEchoNonNullEnumMap( + enumMap: Map + ): Map + + abstract fun callFlutterEchoNonNullClassMap( + classMap: Map + ): Map + + abstract fun callFlutterEchoEnum(anEnum: NIAnEnum): NIAnEnum + + abstract fun callFlutterEchoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum + + abstract fun callFlutterEchoNullableBool(aBool: Boolean?): Boolean? + + abstract fun callFlutterEchoNullableInt(anInt: Long?): Long? + + abstract fun callFlutterEchoNullableDouble(aDouble: Double?): Double? + + abstract fun callFlutterEchoNullableString(aString: String?): String? + + abstract fun callFlutterEchoNullableUint8List(list: ByteArray?): ByteArray? + + abstract fun callFlutterEchoNullableInt32List(list: IntArray?): IntArray? + + abstract fun callFlutterEchoNullableInt64List(list: LongArray?): LongArray? + + abstract fun callFlutterEchoNullableFloat64List(list: DoubleArray?): DoubleArray? + + abstract fun callFlutterEchoNullableList(list: List?): List? + + abstract fun callFlutterEchoNullableEnumList(enumList: List?): List? + + abstract fun callFlutterEchoNullableClassList( + classList: List? + ): List? + + abstract fun callFlutterEchoNullableNonNullEnumList(enumList: List?): List? + + abstract fun callFlutterEchoNullableNonNullClassList( + classList: List? + ): List? + + abstract fun callFlutterEchoNullableMap(map: Map?): Map? + + abstract fun callFlutterEchoNullableStringMap( + stringMap: Map? + ): Map? + + abstract fun callFlutterEchoNullableIntMap(intMap: Map?): Map? + + abstract fun callFlutterEchoNullableEnumMap( + enumMap: Map? + ): Map? + + abstract fun callFlutterEchoNullableClassMap( + classMap: Map? + ): Map? + + abstract fun callFlutterEchoNullableNonNullStringMap( + stringMap: Map? + ): Map? + + abstract fun callFlutterEchoNullableNonNullIntMap(intMap: Map?): Map? + + abstract fun callFlutterEchoNullableNonNullEnumMap( + enumMap: Map? + ): Map? + + abstract fun callFlutterEchoNullableNonNullClassMap( + classMap: Map? + ): Map? + + abstract fun callFlutterEchoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? + + abstract fun callFlutterEchoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? + + abstract suspend fun callFlutterNoopAsync() + + abstract suspend fun callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes + + abstract suspend fun callFlutterEchoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? + + abstract suspend fun callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? + + abstract suspend fun callFlutterEchoAsyncBool(aBool: Boolean): Boolean + + abstract suspend fun callFlutterEchoAsyncInt(anInt: Long): Long + + abstract suspend fun callFlutterEchoAsyncDouble(aDouble: Double): Double + + abstract suspend fun callFlutterEchoAsyncString(aString: String): String + + abstract suspend fun callFlutterEchoAsyncUint8List(list: ByteArray): ByteArray + + abstract suspend fun callFlutterEchoAsyncInt32List(list: IntArray): IntArray + + abstract suspend fun callFlutterEchoAsyncInt64List(list: LongArray): LongArray + + abstract suspend fun callFlutterEchoAsyncFloat64List(list: DoubleArray): DoubleArray + + abstract suspend fun callFlutterEchoAsyncObject(anObject: Any): Any + + abstract suspend fun callFlutterEchoAsyncList(list: List): List + + abstract suspend fun callFlutterEchoAsyncEnumList(enumList: List): List + + abstract suspend fun callFlutterEchoAsyncClassList( + classList: List + ): List + + abstract suspend fun callFlutterEchoAsyncNonNullEnumList(enumList: List): List + + abstract suspend fun callFlutterEchoAsyncNonNullClassList( + classList: List + ): List + + abstract suspend fun callFlutterEchoAsyncMap(map: Map): Map + + abstract suspend fun callFlutterEchoAsyncStringMap( + stringMap: Map + ): Map + + abstract suspend fun callFlutterEchoAsyncIntMap(intMap: Map): Map + + abstract suspend fun callFlutterEchoAsyncEnumMap( + enumMap: Map + ): Map + + abstract suspend fun callFlutterEchoAsyncClassMap( + classMap: Map + ): Map + + abstract suspend fun callFlutterEchoAsyncEnum(anEnum: NIAnEnum): NIAnEnum + + abstract suspend fun callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum + + abstract suspend fun callFlutterEchoAsyncNullableBool(aBool: Boolean?): Boolean? + + abstract suspend fun callFlutterEchoAsyncNullableInt(anInt: Long?): Long? + + abstract suspend fun callFlutterEchoAsyncNullableDouble(aDouble: Double?): Double? + + abstract suspend fun callFlutterEchoAsyncNullableString(aString: String?): String? + + abstract suspend fun callFlutterEchoAsyncNullableUint8List(list: ByteArray?): ByteArray? + + abstract suspend fun callFlutterEchoAsyncNullableInt32List(list: IntArray?): IntArray? + + abstract suspend fun callFlutterEchoAsyncNullableInt64List(list: LongArray?): LongArray? + + abstract suspend fun callFlutterEchoAsyncNullableFloat64List(list: DoubleArray?): DoubleArray? + + abstract suspend fun callFlutterThrowFlutterErrorAsync(): Any? + + abstract suspend fun callFlutterEchoAsyncNullableObject(anObject: Any?): Any? + + abstract suspend fun callFlutterEchoAsyncNullableList(list: List?): List? + + abstract suspend fun callFlutterEchoAsyncNullableEnumList( + enumList: List? + ): List? + + abstract suspend fun callFlutterEchoAsyncNullableClassList( + classList: List? + ): List? + + abstract suspend fun callFlutterEchoAsyncNullableNonNullEnumList( + enumList: List? + ): List? + + abstract suspend fun callFlutterEchoAsyncNullableNonNullClassList( + classList: List? + ): List? + + abstract suspend fun callFlutterEchoAsyncNullableMap(map: Map?): Map? + + abstract suspend fun callFlutterEchoAsyncNullableStringMap( + stringMap: Map? + ): Map? + + abstract suspend fun callFlutterEchoAsyncNullableIntMap( + intMap: Map? + ): Map? + + abstract suspend fun callFlutterEchoAsyncNullableEnumMap( + enumMap: Map? + ): Map? + + abstract suspend fun callFlutterEchoAsyncNullableClassMap( + classMap: Map? + ): Map? + + abstract suspend fun callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? + + abstract suspend fun callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NIAnotherEnum? + ): NIAnotherEnum? + /** Returns true if the handler is run on a main thread. */ + abstract fun defaultIsMainThread(): Boolean + /** + * Spawns a background thread and calls `noop` on the [NIFlutterIntegrationCoreApi]. + * + * Returns the result of whether the flutter call was successful. + */ + abstract suspend fun callFlutterNoopOnBackgroundThread(): Boolean +} + +@Keep +class NIHostIntegrationCoreApiRegistrar : NIHostIntegrationCoreApi() { + var api: NIHostIntegrationCoreApi? = null + + fun register( + api: NIHostIntegrationCoreApi, + name: String = defaultInstanceName + ): NIHostIntegrationCoreApiRegistrar { + this.api = api + NIHostIntegrationCoreApiInstances[name] = this + return this + } + + @Keep + fun getInstance(name: String): NIHostIntegrationCoreApiRegistrar? { + return NIHostIntegrationCoreApiInstances[name] + } + /** A no-op function taking no arguments and returning no value, to sanity test basic calling. */ + override fun noop() { + api?.let { + try { + return api!!.noop() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllTypes(everything: NIAllTypes): NIAllTypes { + api?.let { + try { + return api!!.echoAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns an error, to test error handling. */ + override fun throwError(): Any? { + api?.let { + try { + return api!!.throwError() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns an error from a void function, to test error handling. */ + override fun throwErrorFromVoid() { + api?.let { + try { + return api!!.throwErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns a Flutter error, to test error handling. */ + override fun throwFlutterError(): Any? { + api?.let { + try { + return api!!.throwFlutterError() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoInt(anInt: Long): Long { + api?.let { + try { + return api!!.echoInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.echoDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean. */ + override fun echoBool(aBool: Boolean): Boolean { + api?.let { + try { + return api!!.echoBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoString(aString: String): String { + api?.let { + try { + return api!!.echoString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List. */ + override fun echoUint8List(aUint8List: ByteArray): ByteArray { + api?.let { + try { + return api!!.echoUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List. */ + override fun echoInt32List(aInt32List: IntArray): IntArray { + api?.let { + try { + return api!!.echoInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List. */ + override fun echoInt64List(aInt64List: LongArray): LongArray { + api?.let { + try { + return api!!.echoInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List. */ + override fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray { + api?.let { + try { + return api!!.echoFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object. */ + override fun echoObject(anObject: Any): Any { + api?.let { + try { + return api!!.echoObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoList(list: List): List { + api?.let { + try { + return api!!.echoList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoStringList(stringList: List): List { + api?.let { + try { + return api!!.echoStringList(stringList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoIntList(intList: List): List { + api?.let { + try { + return api!!.echoIntList(intList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoDoubleList(doubleList: List): List { + api?.let { + try { + return api!!.echoDoubleList(doubleList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoBoolList(boolList: List): List { + api?.let { + try { + return api!!.echoBoolList(boolList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoEnumList(enumList: List): List { + api?.let { + try { + return api!!.echoEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoClassList(classList: List): List { + api?.let { + try { + return api!!.echoClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNonNullEnumList(enumList: List): List { + api?.let { + try { + return api!!.echoNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNonNullClassList(classList: List): List { + api?.let { + try { + return api!!.echoNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoMap(map: Map): Map { + api?.let { + try { + return api!!.echoMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.echoStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.echoIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoEnumMap(enumMap: Map): Map { + api?.let { + try { + return api!!.echoEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.echoClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.echoNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.echoNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullEnumMap(enumMap: Map): Map { + api?.let { + try { + return api!!.echoNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.echoNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed class to test nested class serialization and deserialization. */ + override fun echoClassWrapper(wrapper: NIAllClassesWrapper): NIAllClassesWrapper { + api?.let { + try { + return api!!.echoClassWrapper(wrapper) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum to test serialization and deserialization. */ + override fun echoEnum(anEnum: NIAnEnum): NIAnEnum { + api?.let { + try { + return api!!.echoEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum to test serialization and deserialization. */ + override fun echoAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + api?.let { + try { + return api!!.echoAnotherEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the default string. */ + override fun echoNamedDefaultString(aString: String): String { + api?.let { + try { + return api!!.echoNamedDefaultString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoOptionalDefaultDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.echoOptionalDefaultDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoRequiredInt(anInt: Long): Long { + api?.let { + try { + return api!!.echoRequiredInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes? { + api?.let { + try { + return api!!.echoAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + api?.let { + try { + return api!!.echoAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + override fun extractNestedNullableString(wrapper: NIAllClassesWrapper): String? { + api?.let { + try { + return api!!.extractNestedNullableString(wrapper) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + override fun createNestedNullableString(nullableString: String?): NIAllClassesWrapper { + api?.let { + try { + return api!!.createNestedNullableString(nullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes { + api?.let { + try { + return api!!.sendMultipleNullableTypes(aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion { + api?.let { + try { + return api!!.sendMultipleNullableTypesWithoutRecursion( + aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoNullableInt(aNullableInt: Long?): Long? { + api?.let { + try { + return api!!.echoNullableInt(aNullableInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoNullableDouble(aNullableDouble: Double?): Double? { + api?.let { + try { + return api!!.echoNullableDouble(aNullableDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean. */ + override fun echoNullableBool(aNullableBool: Boolean?): Boolean? { + api?.let { + try { + return api!!.echoNullableBool(aNullableBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoNullableString(aNullableString: String?): String? { + api?.let { + try { + return api!!.echoNullableString(aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List. */ + override fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? { + api?.let { + try { + return api!!.echoNullableUint8List(aNullableUint8List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List. */ + override fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? { + api?.let { + try { + return api!!.echoNullableInt32List(aNullableInt32List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List. */ + override fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? { + api?.let { + try { + return api!!.echoNullableInt64List(aNullableInt64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List. */ + override fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? { + api?.let { + try { + return api!!.echoNullableFloat64List(aNullableFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object. */ + override fun echoNullableObject(aNullableObject: Any?): Any? { + api?.let { + try { + return api!!.echoNullableObject(aNullableObject) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableList(aNullableList: List?): List? { + api?.let { + try { + return api!!.echoNullableList(aNullableList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.echoNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.echoNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableNonNullEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.echoNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.echoNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableMap(map: Map?): Map? { + api?.let { + try { + return api!!.echoNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableStringMap(stringMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullStringMap(stringMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + api?.let { + try { + return api!!.echoNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? { + api?.let { + try { + return api!!.echoAnotherNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoOptionalNullableInt(aNullableInt: Long?): Long? { + api?.let { + try { + return api!!.echoOptionalNullableInt(aNullableInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoNamedNullableString(aNullableString: String?): String? { + api?.let { + try { + return api!!.echoNamedNullableString(aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** + * A no-op function taking no arguments and returning no value, to sanity test basic asynchronous + * calling. + */ + override suspend fun noopAsync() { + api?.let { + try { + return api!!.noopAsync() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in int asynchronously. */ + override suspend fun echoAsyncInt(anInt: Long): Long { + api?.let { + try { + return api!!.echoAsyncInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in double asynchronously. */ + override suspend fun echoAsyncDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.echoAsyncDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean asynchronously. */ + override suspend fun echoAsyncBool(aBool: Boolean): Boolean { + api?.let { + try { + return api!!.echoAsyncBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed string asynchronously. */ + override suspend fun echoAsyncString(aString: String): String { + api?.let { + try { + return api!!.echoAsyncString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List asynchronously. */ + override suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray { + api?.let { + try { + return api!!.echoAsyncUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List asynchronously. */ + override suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray { + api?.let { + try { + return api!!.echoAsyncInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List asynchronously. */ + override suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray { + api?.let { + try { + return api!!.echoAsyncInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List asynchronously. */ + override suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray { + api?.let { + try { + return api!!.echoAsyncFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object asynchronously. */ + override suspend fun echoAsyncObject(anObject: Any): Any { + api?.let { + try { + return api!!.echoAsyncObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncList(list: List): List { + api?.let { + try { + return api!!.echoAsyncList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnumList(enumList: List): List { + api?.let { + try { + return api!!.echoAsyncEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncClassList( + classList: List + ): List { + api?.let { + try { + return api!!.echoAsyncClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncMap(map: Map): Map { + api?.let { + try { + return api!!.echoAsyncMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.echoAsyncStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.echoAsyncIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return api!!.echoAsyncEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.echoAsyncClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum { + api?.let { + try { + return api!!.echoAsyncEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + api?.let { + try { + return api!!.echoAnotherAsyncEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Responds with an error from an async function returning a value. */ + override suspend fun throwAsyncError(): Any? { + api?.let { + try { + return api!!.throwAsyncError() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Responds with an error from an async void function. */ + override suspend fun throwAsyncErrorFromVoid() { + api?.let { + try { + return api!!.throwAsyncErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Responds with a Flutter error from an async function returning a value. */ + override suspend fun throwAsyncFlutterError(): Any? { + api?.let { + try { + return api!!.throwAsyncFlutterError() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test async serialization and deserialization. */ + override suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes { + api?.let { + try { + return api!!.echoAsyncNIAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override suspend fun echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? { + api?.let { + try { + return api!!.echoAsyncNullableNIAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + api?.let { + try { + return api!!.echoAsyncNullableNIAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in int asynchronously. */ + override suspend fun echoAsyncNullableInt(anInt: Long?): Long? { + api?.let { + try { + return api!!.echoAsyncNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns passed in double asynchronously. */ + override suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return api!!.echoAsyncNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean asynchronously. */ + override suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return api!!.echoAsyncNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed string asynchronously. */ + override suspend fun echoAsyncNullableString(aString: String?): String? { + api?.let { + try { + return api!!.echoAsyncNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List asynchronously. */ + override suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? { + api?.let { + try { + return api!!.echoAsyncNullableUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List asynchronously. */ + override suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? { + api?.let { + try { + return api!!.echoAsyncNullableInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List asynchronously. */ + override suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? { + api?.let { + try { + return api!!.echoAsyncNullableInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List asynchronously. */ + override suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? { + api?.let { + try { + return api!!.echoAsyncNullableFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object asynchronously. */ + override suspend fun echoAsyncNullableObject(anObject: Any?): Any? { + api?.let { + try { + return api!!.echoAsyncNullableObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableList(list: List?): List? { + api?.let { + try { + return api!!.echoAsyncNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.echoAsyncNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.echoAsyncNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableMap(map: Map?): Map? { + api?.let { + try { + return api!!.echoAsyncNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoAsyncNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.echoAsyncNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoAsyncNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoAsyncNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + api?.let { + try { + return api!!.echoAsyncNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? { + api?.let { + try { + return api!!.echoAnotherAsyncNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterNoop() { + api?.let { + try { + return api!!.callFlutterNoop() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterThrowError(): Any? { + api?.let { + try { + return api!!.callFlutterThrowError() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterThrowErrorFromVoid() { + api?.let { + try { + return api!!.callFlutterThrowErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNIAllTypes(everything: NIAllTypes): NIAllTypes { + api?.let { + try { + return api!!.callFlutterEchoNIAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? { + api?.let { + try { + return api!!.callFlutterEchoNIAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterSendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes { + api?.let { + try { + return api!!.callFlutterSendMultipleNullableTypes( + aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + api?.let { + try { + return api!!.callFlutterEchoNIAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion { + api?.let { + try { + return api!!.callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoBool(aBool: Boolean): Boolean { + api?.let { + try { + return api!!.callFlutterEchoBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoInt(anInt: Long): Long { + api?.let { + try { + return api!!.callFlutterEchoInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.callFlutterEchoDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoString(aString: String): String { + api?.let { + try { + return api!!.callFlutterEchoString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoUint8List(list: ByteArray): ByteArray { + api?.let { + try { + return api!!.callFlutterEchoUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoInt32List(list: IntArray): IntArray { + api?.let { + try { + return api!!.callFlutterEchoInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoInt64List(list: LongArray): LongArray { + api?.let { + try { + return api!!.callFlutterEchoInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoFloat64List(list: DoubleArray): DoubleArray { + api?.let { + try { + return api!!.callFlutterEchoFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoList(list: List): List { + api?.let { + try { + return api!!.callFlutterEchoList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoEnumList(enumList: List): List { + api?.let { + try { + return api!!.callFlutterEchoEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoClassList( + classList: List + ): List { + api?.let { + try { + return api!!.callFlutterEchoClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullEnumList(enumList: List): List { + api?.let { + try { + return api!!.callFlutterEchoNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullClassList( + classList: List + ): List { + api?.let { + try { + return api!!.callFlutterEchoNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoMap(map: Map): Map { + api?.let { + try { + return api!!.callFlutterEchoMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.callFlutterEchoStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.callFlutterEchoIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullStringMap( + stringMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.callFlutterEchoNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoEnum(anEnum: NIAnEnum): NIAnEnum { + api?.let { + try { + return api!!.callFlutterEchoEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + api?.let { + try { + return api!!.callFlutterEchoNIAnotherEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return api!!.callFlutterEchoNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableInt(anInt: Long?): Long? { + api?.let { + try { + return api!!.callFlutterEchoNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return api!!.callFlutterEchoNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableString(aString: String?): String? { + api?.let { + try { + return api!!.callFlutterEchoNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableUint8List(list: ByteArray?): ByteArray? { + api?.let { + try { + return api!!.callFlutterEchoNullableUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableInt32List(list: IntArray?): IntArray? { + api?.let { + try { + return api!!.callFlutterEchoNullableInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableInt64List(list: LongArray?): LongArray? { + api?.let { + try { + return api!!.callFlutterEchoNullableInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableFloat64List(list: DoubleArray?): DoubleArray? { + api?.let { + try { + return api!!.callFlutterEchoNullableFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableList(list: List?): List? { + api?.let { + try { + return api!!.callFlutterEchoNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.callFlutterEchoNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.callFlutterEchoNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.callFlutterEchoNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.callFlutterEchoNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableMap(map: Map?): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoNullableNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + api?.let { + try { + return api!!.callFlutterEchoNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? { + api?.let { + try { + return api!!.callFlutterEchoAnotherNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterNoopAsync() { + api?.let { + try { + return api!!.callFlutterNoopAsync() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes { + api?.let { + try { + return api!!.callFlutterEchoAsyncNIAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableNIAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncBool(aBool: Boolean): Boolean { + api?.let { + try { + return api!!.callFlutterEchoAsyncBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncInt(anInt: Long): Long { + api?.let { + try { + return api!!.callFlutterEchoAsyncInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.callFlutterEchoAsyncDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncString(aString: String): String { + api?.let { + try { + return api!!.callFlutterEchoAsyncString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncUint8List(list: ByteArray): ByteArray { + api?.let { + try { + return api!!.callFlutterEchoAsyncUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncInt32List(list: IntArray): IntArray { + api?.let { + try { + return api!!.callFlutterEchoAsyncInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncInt64List(list: LongArray): LongArray { + api?.let { + try { + return api!!.callFlutterEchoAsyncInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncFloat64List(list: DoubleArray): DoubleArray { + api?.let { + try { + return api!!.callFlutterEchoAsyncFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncObject(anObject: Any): Any { + api?.let { + try { + return api!!.callFlutterEchoAsyncObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncList(list: List): List { + api?.let { + try { + return api!!.callFlutterEchoAsyncList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncEnumList(enumList: List): List { + api?.let { + try { + return api!!.callFlutterEchoAsyncEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncClassList( + classList: List + ): List { + api?.let { + try { + return api!!.callFlutterEchoAsyncClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNonNullEnumList( + enumList: List + ): List { + api?.let { + try { + return api!!.callFlutterEchoAsyncNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNonNullClassList( + classList: List + ): List { + api?.let { + try { + return api!!.callFlutterEchoAsyncNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncMap(map: Map): Map { + api?.let { + try { + return api!!.callFlutterEchoAsyncMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncStringMap( + stringMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoAsyncStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.callFlutterEchoAsyncIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoAsyncEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.callFlutterEchoAsyncClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncEnum(anEnum: NIAnEnum): NIAnEnum { + api?.let { + try { + return api!!.callFlutterEchoAsyncEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + api?.let { + try { + return api!!.callFlutterEchoAnotherAsyncEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableInt(anInt: Long?): Long? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableString(aString: String?): String? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableUint8List(list: ByteArray?): ByteArray? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableInt32List(list: IntArray?): IntArray? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableInt64List(list: LongArray?): LongArray? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableFloat64List(list: DoubleArray?): DoubleArray? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterThrowFlutterErrorAsync(): Any? { + api?.let { + try { + return api!!.callFlutterThrowFlutterErrorAsync() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableObject(anObject: Any?): Any? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableList(list: List?): List? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableEnumList( + enumList: List? + ): List? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNonNullEnumList( + enumList: List? + ): List? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableMap(map: Map?): Map? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableIntMap( + intMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + api?.let { + try { + return api!!.callFlutterEchoAsyncNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NIAnotherEnum? + ): NIAnotherEnum? { + api?.let { + try { + return api!!.callFlutterEchoAnotherAsyncNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** Returns true if the handler is run on a main thread. */ + override fun defaultIsMainThread(): Boolean { + api?.let { + try { + return api!!.defaultIsMainThread() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } + /** + * Spawns a background thread and calls `noop` on the [NIFlutterIntegrationCoreApi]. + * + * Returns the result of whether the flutter call was successful. + */ + override suspend fun callFlutterNoopOnBackgroundThread(): Boolean { + api?.let { + try { + return api!!.callFlutterNoopOnBackgroundThread() + } catch (e: Exception) { + throw e + } + } + error("NIHostIntegrationCoreApi has not been set") + } +} +/** + * The core interface that the Dart platform_test code implements for host integration tests to call + * into. + * + * Generated class from Pigeon that represents Flutter messages that can be called from Kotlin. + */ +val registeredNIFlutterIntegrationCoreApi: MutableMap = + mutableMapOf() + +class NIFlutterIntegrationCoreApiRegistrar() { + /// Map that stores instances + + fun registerInstance(api: NIFlutterIntegrationCoreApi, name: String = defaultInstanceName) { + registeredNIFlutterIntegrationCoreApi[name] = api + } + + fun getInstance(name: String = defaultInstanceName): NIFlutterIntegrationCoreApi? { + return registeredNIFlutterIntegrationCoreApi[name] + } +} + +interface NIFlutterIntegrationCoreApi { + /** A no-op function taking no arguments and returning no value, to sanity test basic calling. */ + fun noop() + /** Returns a Flutter error, to test error handling. */ + fun throwFlutterError(): Any? + /** Responds with an error from an async function returning a value. */ + fun throwError(): Any? + /** Responds with an error from an async void function. */ + fun throwErrorFromVoid() + /** Returns the passed object, to test serialization and deserialization. */ + fun echoNIAllTypes(everything: NIAllTypes): NIAllTypes + /** Returns the passed object, to test serialization and deserialization. */ + fun echoNIAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes? + /** + * Returns passed in arguments of multiple types. + * + * Tests multiple-arity FlutterApi handling. + */ + fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes + /** Returns the passed object, to test serialization and deserialization. */ + fun echoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? + /** + * Returns passed in arguments of multiple types. + * + * Tests multiple-arity FlutterApi handling. + */ + fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion + /** Returns the passed boolean, to test serialization and deserialization. */ + fun echoBool(aBool: Boolean): Boolean + /** Returns the passed int, to test serialization and deserialization. */ + fun echoInt(anInt: Long): Long + /** Returns the passed double, to test serialization and deserialization. */ + fun echoDouble(aDouble: Double): Double + /** Returns the passed string, to test serialization and deserialization. */ + fun echoString(aString: String): String + /** Returns the passed byte list, to test serialization and deserialization. */ + fun echoUint8List(list: ByteArray): ByteArray + /** Returns the passed int32 list, to test serialization and deserialization. */ + fun echoInt32List(list: IntArray): IntArray + /** Returns the passed int64 list, to test serialization and deserialization. */ + fun echoInt64List(list: LongArray): LongArray + /** Returns the passed float64 list, to test serialization and deserialization. */ + fun echoFloat64List(list: DoubleArray): DoubleArray + /** Returns the passed list, to test serialization and deserialization. */ + fun echoList(list: List): List + /** Returns the passed list, to test serialization and deserialization. */ + fun echoEnumList(enumList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + fun echoClassList(classList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNonNullEnumList(enumList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNonNullClassList(classList: List): List + /** Returns the passed map, to test serialization and deserialization. */ + fun echoMap(map: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoStringMap(stringMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoIntMap(intMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoEnumMap(enumMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoClassMap(classMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNonNullStringMap(stringMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNonNullIntMap(intMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNonNullEnumMap(enumMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNonNullClassMap(classMap: Map): Map + /** Returns the passed enum to test serialization and deserialization. */ + fun echoEnum(anEnum: NIAnEnum): NIAnEnum + /** Returns the passed enum to test serialization and deserialization. */ + fun echoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum + /** Returns the passed boolean, to test serialization and deserialization. */ + fun echoNullableBool(aBool: Boolean?): Boolean? + /** Returns the passed int, to test serialization and deserialization. */ + fun echoNullableInt(anInt: Long?): Long? + /** Returns the passed double, to test serialization and deserialization. */ + fun echoNullableDouble(aDouble: Double?): Double? + /** Returns the passed string, to test serialization and deserialization. */ + fun echoNullableString(aString: String?): String? + /** Returns the passed byte list, to test serialization and deserialization. */ + fun echoNullableUint8List(list: ByteArray?): ByteArray? + /** Returns the passed int32 list, to test serialization and deserialization. */ + fun echoNullableInt32List(list: IntArray?): IntArray? + /** Returns the passed int64 list, to test serialization and deserialization. */ + fun echoNullableInt64List(list: LongArray?): LongArray? + /** Returns the passed float64 list, to test serialization and deserialization. */ + fun echoNullableFloat64List(list: DoubleArray?): DoubleArray? + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNullableList(list: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNullableEnumList(enumList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNullableClassList(classList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNullableNonNullEnumList(enumList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNullableNonNullClassList(classList: List?): List? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableMap(map: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableStringMap(stringMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableIntMap(intMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableEnumMap(enumMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableClassMap( + classMap: Map? + ): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableNonNullStringMap(stringMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableNonNullIntMap(intMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableNonNullEnumMap(enumMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? + /** Returns the passed enum to test serialization and deserialization. */ + fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? + /** Returns the passed enum to test serialization and deserialization. */ + fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? + /** + * A no-op function taking no arguments and returning no value, to sanity test basic asynchronous + * calling. + */ + suspend fun noopAsync() + + suspend fun throwFlutterErrorAsync(): Any? + + suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes + + suspend fun echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? + + suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? + + suspend fun echoAsyncBool(aBool: Boolean): Boolean + + suspend fun echoAsyncInt(anInt: Long): Long + + suspend fun echoAsyncDouble(aDouble: Double): Double + + suspend fun echoAsyncString(aString: String): String + + suspend fun echoAsyncUint8List(list: ByteArray): ByteArray + + suspend fun echoAsyncInt32List(list: IntArray): IntArray + + suspend fun echoAsyncInt64List(list: LongArray): LongArray + + suspend fun echoAsyncFloat64List(list: DoubleArray): DoubleArray + + suspend fun echoAsyncObject(anObject: Any): Any + + suspend fun echoAsyncList(list: List): List + + suspend fun echoAsyncEnumList(enumList: List): List + + suspend fun echoAsyncClassList(classList: List): List + + suspend fun echoAsyncNonNullEnumList(enumList: List): List + + suspend fun echoAsyncNonNullClassList( + classList: List + ): List + + suspend fun echoAsyncMap(map: Map): Map + + suspend fun echoAsyncStringMap(stringMap: Map): Map + + suspend fun echoAsyncIntMap(intMap: Map): Map + + suspend fun echoAsyncEnumMap(enumMap: Map): Map + + suspend fun echoAsyncClassMap( + classMap: Map + ): Map + + suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum + + suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum + + suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? + + suspend fun echoAsyncNullableInt(anInt: Long?): Long? + + suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? + + suspend fun echoAsyncNullableString(aString: String?): String? + + suspend fun echoAsyncNullableUint8List(list: ByteArray?): ByteArray? + + suspend fun echoAsyncNullableInt32List(list: IntArray?): IntArray? + + suspend fun echoAsyncNullableInt64List(list: LongArray?): LongArray? + + suspend fun echoAsyncNullableFloat64List(list: DoubleArray?): DoubleArray? + + suspend fun echoAsyncNullableObject(anObject: Any?): Any? + + suspend fun echoAsyncNullableList(list: List?): List? + + suspend fun echoAsyncNullableEnumList(enumList: List?): List? + + suspend fun echoAsyncNullableClassList( + classList: List? + ): List? + + suspend fun echoAsyncNullableNonNullEnumList(enumList: List?): List? + + suspend fun echoAsyncNullableNonNullClassList( + classList: List? + ): List? + + suspend fun echoAsyncNullableMap(map: Map?): Map? + + suspend fun echoAsyncNullableStringMap(stringMap: Map?): Map? + + suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? + + suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? + + suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? + + suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? + + suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? +} diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt index ea402e91d7a4..d94586560fef 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt @@ -4,10 +4,22 @@ package com.example.test_plugin +import NIAllClassesWrapper +import NIAllNullableTypes +import NIAllNullableTypesWithoutRecursion +import NIAllTypes +import NIAnEnum +import NIAnotherEnum +import NIFlutterIntegrationCoreApiRegistrar +import NIHostIntegrationCoreApi +import NIHostIntegrationCoreApiRegistrar +import NiTestsError import android.os.Handler import android.os.Looper import io.flutter.embedding.engine.plugins.FlutterPlugin import io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterPluginBinding +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.withContext /** This plugin handles the native side of the integration tests in example/integration_test/. */ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { @@ -15,6 +27,9 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { private var flutterSmallApiOne: FlutterSmallApi? = null private var flutterSmallApiTwo: FlutterSmallApi? = null private var proxyApiRegistrar: ProxyApiRegistrar? = null + private var niMessageApi: NIHostIntegrationCoreApiRegistrar? = null + // private var niSmallApiOne: NIHostSmallApiRegistrar? = null + // private var niSmallApiTwo: NIHostSmallApiRegistrar? = null override fun onAttachedToEngine(binding: FlutterPluginBinding) { HostIntegrationCoreApi.setUp(binding.binaryMessenger, this) @@ -22,6 +37,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { testSuffixApiOne.setUp(binding, "suffixOne") val testSuffixApiTwo = TestPluginWithSuffix() testSuffixApiTwo.setUp(binding, "suffixTwo") + niMessageApi = NIHostIntegrationCoreApiRegistrar().register(NIIntegrationTests()) flutterApi = FlutterIntegrationCoreApi(binding.binaryMessenger) flutterSmallApiOne = FlutterSmallApi(binding.binaryMessenger, "suffixOne") flutterSmallApiTwo = FlutterSmallApi(binding.binaryMessenger, "suffixTwo") @@ -37,7 +53,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { binding.binaryMessenger, SendConsistentNumbers(2), "2") } - override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + override fun onDetachedFromEngine(binding: FlutterPluginBinding) { proxyApiRegistrar?.tearDown() } @@ -73,7 +89,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { return everything } - override fun throwError(): Any? { + override fun throwError(): Any { throw Exception("An error") } @@ -81,7 +97,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { throw Exception("An error") } - override fun throwFlutterError(): Any? { + override fun throwFlutterError(): Any { throw FlutterError("code", "message", "details") } @@ -899,6 +915,1074 @@ class TestPluginWithSuffix : HostSmallApi { } } +class NIIntegrationTests : NIHostIntegrationCoreApi() { + override fun noop() {} + + override fun echoAllTypes(everything: NIAllTypes): NIAllTypes { + return everything + } + + override fun throwError(): Any? { + throw Exception("An error") + } + + override fun throwErrorFromVoid() { + throw Exception("An error") + } + + override fun throwFlutterError(): Any? { + throw NiTestsError("code", "message", "details") + } + + override fun echoInt(anInt: Long): Long { + return anInt + } + + override fun echoDouble(aDouble: Double): Double { + return aDouble + } + + override fun echoBool(aBool: Boolean): Boolean { + return aBool + } + + override fun echoString(aString: String): String { + return aString + } + + override fun echoUint8List(aUint8List: ByteArray): ByteArray { + return aUint8List + } + + override fun echoInt32List(aInt32List: IntArray): IntArray { + return aInt32List + } + + override fun echoInt64List(aInt64List: LongArray): LongArray { + return aInt64List + } + + override fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray { + return aFloat64List + } + + override fun echoObject(anObject: Any): Any { + return anObject + } + + override fun echoList(list: List): List { + return list + } + + override fun echoStringList(stringList: List): List { + return stringList + } + + override fun echoIntList(intList: List): List { + return intList + } + + override fun echoDoubleList(doubleList: List): List { + return doubleList + } + + override fun echoBoolList(boolList: List): List { + return boolList + } + + override fun echoEnumList(enumList: List): List { + return enumList + } + + override fun echoClassList(classList: List): List { + return classList + } + + override fun echoNonNullEnumList(enumList: List): List { + return enumList + } + + override fun echoNonNullClassList(classList: List): List { + return classList + } + + override fun echoMap(map: Map): Map { + return map + } + + override fun echoStringMap(stringMap: Map): Map { + return stringMap + } + + override fun echoIntMap(intMap: Map): Map { + return intMap + } + + override fun echoEnumMap(enumMap: Map): Map { + return enumMap + } + + override fun echoClassMap( + classMap: Map + ): Map { + return classMap + } + + override fun echoNonNullStringMap(stringMap: Map): Map { + return stringMap + } + + override fun echoNonNullIntMap(intMap: Map): Map { + return intMap + } + + override fun echoNonNullEnumMap(enumMap: Map): Map { + return enumMap + } + + override fun echoNonNullClassMap( + classMap: Map + ): Map { + return classMap + } + + override fun echoClassWrapper(wrapper: NIAllClassesWrapper): NIAllClassesWrapper { + return wrapper + } + + override fun echoEnum(anEnum: NIAnEnum): NIAnEnum { + return anEnum + } + + override fun echoAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + return anotherEnum + } + // + override fun echoNamedDefaultString(aString: String): String { + return aString + } + + override fun echoOptionalDefaultDouble(aDouble: Double): Double { + return aDouble + } + + override fun echoRequiredInt(anInt: Long): Long { + return anInt + } + + override fun echoAllNullableTypes(everything: NIAllNullableTypes?): NIAllNullableTypes? { + return everything + } + + override fun echoAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + return everything + } + + override fun extractNestedNullableString(wrapper: NIAllClassesWrapper): String? { + return wrapper.allNullableTypes.aNullableString + } + + override fun createNestedNullableString(nullableString: String?): NIAllClassesWrapper { + return NIAllClassesWrapper( + NIAllNullableTypes(aNullableString = nullableString), + classList = arrayOf().toList(), + classMap = HashMap()) + } + + override fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes { + return NIAllNullableTypes( + aNullableBool = aNullableBool, + aNullableInt = aNullableInt, + aNullableString = aNullableString) + } + + override fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion { + return NIAllNullableTypesWithoutRecursion( + aNullableBool = aNullableBool, + aNullableInt = aNullableInt, + aNullableString = aNullableString) + } + + override fun echoNullableInt(aNullableInt: Long?): Long? { + return aNullableInt + } + + override fun echoNullableDouble(aNullableDouble: Double?): Double? { + return aNullableDouble + } + + override fun echoNullableBool(aNullableBool: Boolean?): Boolean? { + return aNullableBool + } + + override fun echoNullableString(aNullableString: String?): String? { + return aNullableString + } + + override fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? { + return aNullableUint8List + } + + override fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? { + return aNullableInt32List + } + + override fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? { + return aNullableInt64List + } + + override fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? { + return aNullableFloat64List + } + + override fun echoNullableObject(aNullableObject: Any?): Any? { + return aNullableObject + } + + override fun echoNullableList(aNullableList: List?): List? { + return aNullableList + } + + override fun echoNullableEnumList(enumList: List?): List? { + return enumList + } + + override fun echoNullableClassList( + classList: List? + ): List? { + return classList + } + + override fun echoNullableNonNullEnumList(enumList: List?): List? { + return enumList + } + + override fun echoNullableNonNullClassList( + classList: List? + ): List? { + return classList + } + + override fun echoNullableMap(map: Map?): Map? { + return map + } + + override fun echoNullableStringMap(stringMap: Map?): Map? { + return stringMap + } + + override fun echoNullableIntMap(intMap: Map?): Map? { + return intMap + } + + override fun echoNullableEnumMap( + enumMap: Map? + ): Map? { + return enumMap + } + + override fun echoNullableClassMap( + classMap: Map? + ): Map? { + return classMap + } + + override fun echoNullableNonNullStringMap(stringMap: Map?): Map? { + return stringMap + } + + override fun echoNullableNonNullIntMap(intMap: Map?): Map? { + return intMap + } + + override fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + return enumMap + } + + override fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? { + return classMap + } + + override fun echoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + return anEnum + } + + override fun echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? { + return anotherEnum + } + + override fun echoOptionalNullableInt(aNullableInt: Long?): Long? { + return aNullableInt + } + + override fun echoNamedNullableString(aNullableString: String?): String? { + return aNullableString + } + + override suspend fun noopAsync() { + return + } + + override suspend fun echoAsyncInt(anInt: Long): Long { + return anInt + } + + override suspend fun echoAsyncDouble(aDouble: Double): Double { + return aDouble + } + + override suspend fun echoAsyncBool(aBool: Boolean): Boolean { + return aBool + } + + override suspend fun echoAsyncString(aString: String): String { + return aString + } + + override suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray { + return aUint8List + } + + override suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray { + return aInt32List + } + + override suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray { + return aInt64List + } + + override suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray { + return aFloat64List + } + + override suspend fun echoAsyncObject(anObject: Any): Any { + return anObject + } + + override suspend fun echoAsyncList(list: List): List { + return list + } + + override suspend fun echoAsyncEnumList(enumList: List): List { + return enumList + } + + override suspend fun echoAsyncClassList( + classList: List + ): List { + return classList + } + + override suspend fun echoAsyncMap(map: Map): Map { + return map + } + + override suspend fun echoAsyncStringMap(stringMap: Map): Map { + return stringMap + } + + override suspend fun echoAsyncIntMap(intMap: Map): Map { + return intMap + } + + override suspend fun echoAsyncEnumMap( + enumMap: Map + ): Map { + return enumMap + } + + override suspend fun echoAsyncClassMap( + classMap: Map + ): Map { + return classMap + } + + override suspend fun echoAsyncEnum(anEnum: NIAnEnum): NIAnEnum { + return anEnum + } + + override suspend fun echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + return anotherEnum + } + + override suspend fun throwAsyncError(): Any? { + throw Exception("An error") + } + + override suspend fun throwAsyncErrorFromVoid() { + throw Exception("An error") + } + + override suspend fun throwAsyncFlutterError(): Any? { + throw NiTestsError("code", "message", "details") + } + + override suspend fun echoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes { + return everything + } + + override suspend fun echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? { + return everything + } + + override suspend fun echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + return everything + } + + override suspend fun echoAsyncNullableInt(anInt: Long?): Long? { + return anInt + } + + override suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? { + return aDouble + } + + override suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? { + return aBool + } + + override suspend fun echoAsyncNullableString(aString: String?): String? { + return aString + } + + override suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? { + return aUint8List + } + + override suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? { + return aInt32List + } + + override suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? { + return aInt64List + } + + override suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? { + return aFloat64List + } + + override suspend fun echoAsyncNullableObject(anObject: Any?): Any? { + return anObject + } + + override suspend fun echoAsyncNullableList(list: List?): List? { + return list + } + + override suspend fun echoAsyncNullableEnumList(enumList: List?): List? { + return enumList + } + + override suspend fun echoAsyncNullableClassList( + classList: List? + ): List? { + return classList + } + + override suspend fun echoAsyncNullableMap(map: Map?): Map? { + return map + } + + override suspend fun echoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + return stringMap + } + + override suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? { + return intMap + } + + override suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + return enumMap + } + + override suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? { + return classMap + } + + override suspend fun echoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + return anEnum + } + + override suspend fun echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? { + return anotherEnum + } + + override fun callFlutterNoop() { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.noop() + } + + override fun callFlutterThrowError(): Any? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.throwError() + } + + override fun callFlutterThrowErrorFromVoid() { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.throwErrorFromVoid() + } + + override fun callFlutterEchoNIAllTypes(everything: NIAllTypes): NIAllTypes { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNIAllTypes(everything) + } + + override fun callFlutterEchoNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNIAllNullableTypes(everything) + } + + override fun callFlutterSendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypes { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .sendMultipleNullableTypes(aNullableBool, aNullableInt, aNullableString) + } + + override fun callFlutterEchoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNIAllNullableTypesWithoutRecursion(everything) + } + + override fun callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NIAllNullableTypesWithoutRecursion { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .sendMultipleNullableTypesWithoutRecursion(aNullableBool, aNullableInt, aNullableString) + } + + override fun callFlutterEchoBool(aBool: Boolean): Boolean { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoBool(aBool) + } + + override fun callFlutterEchoInt(anInt: Long): Long { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoInt(anInt) + } + + override fun callFlutterEchoDouble(aDouble: Double): Double { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoDouble(aDouble) + } + // + override fun callFlutterEchoString(aString: String): String { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoString(aString) + } + + override fun callFlutterEchoUint8List(list: ByteArray): ByteArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoUint8List(list) + } + + override fun callFlutterEchoInt32List(list: IntArray): IntArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoInt32List(list) + } + + override fun callFlutterEchoInt64List(list: LongArray): LongArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoInt64List(list) + } + + override fun callFlutterEchoFloat64List(list: DoubleArray): DoubleArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoFloat64List(list) + } + + override fun callFlutterEchoList(list: List): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoList(list) + } + + override fun callFlutterEchoEnumList(enumList: List): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoEnumList(enumList) + } + + override fun callFlutterEchoClassList( + classList: List + ): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoClassList(classList) + } + + override fun callFlutterEchoNonNullEnumList(enumList: List): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNonNullEnumList(enumList) + } + + override fun callFlutterEchoNonNullClassList( + classList: List + ): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNonNullClassList(classList) + } + + override fun callFlutterEchoMap(map: Map): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoMap(map) + } + + override fun callFlutterEchoStringMap(stringMap: Map): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoStringMap(stringMap) + } + + override fun callFlutterEchoIntMap(intMap: Map): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoIntMap(intMap) + } + + override fun callFlutterEchoEnumMap( + enumMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoEnumMap(enumMap) + } + + override fun callFlutterEchoClassMap( + classMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoClassMap(classMap) + } + + override fun callFlutterEchoNonNullStringMap( + stringMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNonNullStringMap(stringMap) + } + + override fun callFlutterEchoNonNullIntMap(intMap: Map): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNonNullIntMap(intMap) + } + + override fun callFlutterEchoNonNullEnumMap( + enumMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNonNullEnumMap(enumMap) + } + + override fun callFlutterEchoNonNullClassMap( + classMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNonNullClassMap(classMap) + } + + override fun callFlutterEchoEnum(anEnum: NIAnEnum): NIAnEnum { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoEnum(anEnum) + } + + override fun callFlutterEchoNIAnotherEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNIAnotherEnum(anotherEnum) + } + + override fun callFlutterEchoNullableBool(aBool: Boolean?): Boolean? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableBool(aBool) + } + + override fun callFlutterEchoNullableInt(anInt: Long?): Long? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableInt(anInt) + } + + override fun callFlutterEchoNullableDouble(aDouble: Double?): Double? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableDouble(aDouble) + } + + override fun callFlutterEchoNullableString(aString: String?): String? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableString(aString) + } + + override fun callFlutterEchoNullableUint8List(list: ByteArray?): ByteArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableUint8List(list) + } + + override fun callFlutterEchoNullableInt32List(list: IntArray?): IntArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableInt32List(list) + } + + override fun callFlutterEchoNullableInt64List(list: LongArray?): LongArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableInt64List(list) + } + + override fun callFlutterEchoNullableFloat64List(list: DoubleArray?): DoubleArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableFloat64List(list) + } + + override fun callFlutterEchoNullableList(list: List?): List? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableList(list) + } + + override fun callFlutterEchoNullableEnumList(enumList: List?): List? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableEnumList(enumList) + } + + override fun callFlutterEchoNullableClassList( + classList: List? + ): List? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableClassList(classList) + } + + override fun callFlutterEchoNullableNonNullEnumList(enumList: List?): List? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullEnumList(enumList) + } + + override fun callFlutterEchoNullableNonNullClassList( + classList: List? + ): List? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullClassList(classList) + } + + override fun callFlutterEchoNullableMap(map: Map?): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableMap(map) + } + + override fun callFlutterEchoNullableStringMap( + stringMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableStringMap(stringMap) + } + + override fun callFlutterEchoNullableIntMap(intMap: Map?): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableIntMap(intMap) + } + + override fun callFlutterEchoNullableEnumMap( + enumMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableEnumMap(enumMap) + } + + override fun callFlutterEchoNullableClassMap( + classMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableClassMap(classMap) + } + + override fun callFlutterEchoNullableNonNullStringMap( + stringMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullStringMap(stringMap) + } + + override fun callFlutterEchoNullableNonNullIntMap(intMap: Map?): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableNonNullIntMap(intMap) + } + + override fun callFlutterEchoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullEnumMap(enumMap) + } + + override fun callFlutterEchoNullableNonNullClassMap( + classMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullClassMap(classMap) + } + + override fun callFlutterEchoNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableEnum(anEnum) + } + + override fun callFlutterEchoAnotherNullableEnum(anotherEnum: NIAnotherEnum?): NIAnotherEnum? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAnotherNullableEnum(anotherEnum) + } + + override suspend fun callFlutterNoopAsync() { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.noopAsync() + } + + override suspend fun callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes): NIAllTypes { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNIAllTypes(everything) + } + + override suspend fun callFlutterEchoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypes? + ): NIAllNullableTypes? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNIAllNullableTypes(everything) + } + + override suspend fun callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ): NIAllNullableTypesWithoutRecursion? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNIAllNullableTypesWithoutRecursion(everything) + } + + override suspend fun callFlutterEchoAsyncBool(aBool: Boolean): Boolean { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncBool(aBool) + } + + override suspend fun callFlutterEchoAsyncInt(anInt: Long): Long { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncInt(anInt) + } + + override suspend fun callFlutterEchoAsyncDouble(aDouble: Double): Double { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncDouble(aDouble) + } + + override suspend fun callFlutterEchoAsyncString(aString: String): String { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncString(aString) + } + + override suspend fun callFlutterEchoAsyncUint8List(list: ByteArray): ByteArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncUint8List(list) + } + + override suspend fun callFlutterEchoAsyncInt32List(list: IntArray): IntArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncInt32List(list) + } + + override suspend fun callFlutterEchoAsyncInt64List(list: LongArray): LongArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncInt64List(list) + } + + override suspend fun callFlutterEchoAsyncFloat64List(list: DoubleArray): DoubleArray { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncFloat64List(list) + } + + override suspend fun callFlutterEchoAsyncObject(anObject: Any): Any { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncObject(anObject) + } + + override suspend fun callFlutterEchoAsyncList(list: List): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncList(list) + } + + override suspend fun callFlutterEchoAsyncEnumList(enumList: List): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncClassList( + classList: List + ): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncClassList(classList) + } + + override suspend fun callFlutterEchoAsyncNonNullEnumList( + enumList: List + ): List { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNonNullEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncNonNullClassList( + classList: List + ): List { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNonNullClassList(classList) + } + + override suspend fun callFlutterEchoAsyncMap(map: Map): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncMap(map) + } + + override suspend fun callFlutterEchoAsyncStringMap( + stringMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncStringMap(stringMap) + } + + override suspend fun callFlutterEchoAsyncIntMap(intMap: Map): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncIntMap(intMap) + } + + override suspend fun callFlutterEchoAsyncEnumMap( + enumMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncEnumMap(enumMap) + } + + override suspend fun callFlutterEchoAsyncClassMap( + classMap: Map + ): Map { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncClassMap(classMap) + } + + override suspend fun callFlutterEchoAsyncEnum(anEnum: NIAnEnum): NIAnEnum { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncEnum(anEnum) + } + + override suspend fun callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum): NIAnotherEnum { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAnotherAsyncEnum(anotherEnum) + } + + override suspend fun callFlutterEchoAsyncNullableBool(aBool: Boolean?): Boolean? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableBool(aBool) + } + + override suspend fun callFlutterEchoAsyncNullableInt(anInt: Long?): Long? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableInt(anInt) + } + + override suspend fun callFlutterEchoAsyncNullableDouble(aDouble: Double?): Double? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableDouble(aDouble) + } + + override suspend fun callFlutterEchoAsyncNullableString(aString: String?): String? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableString(aString) + } + + override suspend fun callFlutterEchoAsyncNullableUint8List(list: ByteArray?): ByteArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableUint8List(list) + } + + override suspend fun callFlutterEchoAsyncNullableInt32List(list: IntArray?): IntArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableInt32List(list) + } + + override suspend fun callFlutterEchoAsyncNullableInt64List(list: LongArray?): LongArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableInt64List(list) + } + + override suspend fun callFlutterEchoAsyncNullableFloat64List(list: DoubleArray?): DoubleArray? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableFloat64List(list) + } + + override suspend fun callFlutterThrowFlutterErrorAsync(): Any? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.throwFlutterErrorAsync() + } + + override suspend fun callFlutterEchoAsyncNullableObject(anObject: Any?): Any? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableObject(anObject) + } + + override suspend fun callFlutterEchoAsyncNullableList(list: List?): List? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableList(list) + } + + override suspend fun callFlutterEchoAsyncNullableEnumList( + enumList: List? + ): List? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncNullableClassList( + classList: List? + ): List? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableClassList(classList) + } + + override suspend fun callFlutterEchoAsyncNullableNonNullEnumList( + enumList: List? + ): List? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNonNullEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncNullableNonNullClassList( + classList: List? + ): List? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNonNullClassList(classList) + } + + override suspend fun callFlutterEchoAsyncNullableMap(map: Map?): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableMap(map) + } + + override suspend fun callFlutterEchoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableStringMap(stringMap) + } + + override suspend fun callFlutterEchoAsyncNullableIntMap( + intMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableIntMap(intMap) + } + + override suspend fun callFlutterEchoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableEnumMap(enumMap) + } + + override suspend fun callFlutterEchoAsyncNullableClassMap( + classMap: Map? + ): Map? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableClassMap(classMap) + } + + override suspend fun callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?): NIAnEnum? { + return NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncNullableEnum(anEnum) + } + + override suspend fun callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NIAnotherEnum? + ): NIAnotherEnum? { + return NIFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAnotherAsyncNullableEnum(anotherEnum) + } + + override fun defaultIsMainThread(): Boolean { + return Thread.currentThread() == Looper.getMainLooper().thread + } + + override suspend fun callFlutterNoopOnBackgroundThread(): Boolean { + return withContext(Dispatchers.Default) { + try { + NIFlutterIntegrationCoreApiRegistrar().getInstance()!!.noopAsync() + true + } catch (e: Exception) { + false + } + } + } +} + +// class NIHostSmallApiTests : NIHostSmallApi() { +// override suspend fun echo(aString: String): String { +// return aString +// } +// +// override suspend fun voidVoid() { +// return +// } +// } + object SendInts : StreamIntsStreamHandler() { val handler = Handler(Looper.getMainLooper()) @@ -935,7 +2019,7 @@ object SendClass : StreamEventsStreamHandler() { ClassEvent(EventAllNullableTypes(aNullableInt = 0))) override fun onListen(p0: Any?, sink: PigeonEventSink) { - var count: Int = 0 + var count = 0 val r: Runnable = object : Runnable { override fun run() { @@ -959,7 +2043,7 @@ class SendConsistentNumbers(private val numberToSend: Long) : private val handler = Handler(Looper.getMainLooper()) override fun onListen(p0: Any?, sink: PigeonEventSink) { - var count: Int = 0 + var count = 0 val r: Runnable = object : Runnable { override fun run() { diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin.podspec b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin.podspec index 42b91b209605..b31b5e4dc323 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin.podspec +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.license = { :type => 'BSD', :file => '../../../LICENSE' } s.author = { 'Your Company' => 'email@example.com' } s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/pigeon' } - s.source_files = 'test_plugin/Sources/test_plugin/**/*.swift' + s.source_files = 'test_plugin/Sources/**/*.{swift,m}' s.ios.dependency 'Flutter' s.osx.dependency 'FlutterMacOS' s.ios.deployment_target = '12.0' diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Package.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Package.swift index 2605499b319c..29c8a2a25104 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Package.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Package.swift @@ -19,9 +19,14 @@ let package = Package( dependencies: [], targets: [ .target( - name: "test_plugin", + name: "test_plugin_objc", dependencies: [], resources: [] - ) + ), + .target( + name: "test_plugin", + dependencies: ["test_plugin_objc"], + resources: [] + ), ] ) diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/.gitignore b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/.gitignore index ad1dc18f98c4..dd3e07ed9e7d 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/.gitignore +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/.gitignore @@ -8,3 +8,4 @@ # Including these makes it easier to review code generation changes. !ProxyApiTestClass.swift !EventChannelTests.gen.swift +!NiTests.gen.swift diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift index 606d58783837..3efe5572d47b 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift @@ -66,7 +66,15 @@ private func createConnectionError(withChannelName channelName: String) -> Pigeo } private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull } private func nilOrValue(_ value: Any?) -> T? { @@ -4558,6 +4566,7 @@ class HostIntegrationCoreApiSetup { } } } + /// The core interface that the Dart platform_test code implements for host /// integration tests to call into. /// @@ -6253,6 +6262,7 @@ class HostSmallApiSetup { } } } + /// A simple API called in some unit tests. /// /// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift. diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/EventChannelTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/EventChannelTests.gen.swift index da3e19626382..3123c1872a0d 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/EventChannelTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/EventChannelTests.gen.swift @@ -34,7 +34,15 @@ final class EventChannelTestsError: Error { } private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull } private func nilOrValue(_ value: Any?) -> T? { diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NiTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NiTests.gen.swift new file mode 100644 index 000000000000..daa9ce96cd95 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NiTests.gen.swift @@ -0,0 +1,7822 @@ +// 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, do not edit directly. +// See also: https://pub.dev/packages/pigeon + +import Foundation + +/// Error class for passing custom error details to Dart side. +@objc final class NiTestsError: NSObject, Error { + @objc var code: String? + @objc var message: String? + @objc var details: String? + + @objc override init() {} + + @objc init(code: String?, message: String?, details: String?) { + self.code = code + self.message = message + self.details = details + } + + var localizedDescription: String { + return + "NiTestsError(code: \(code ?? ""), message: \(message ?? ""), details: \(details ?? "")" + } +} + +private func createConnectionError(withChannelName channelName: String) -> NiTestsError { + return NiTestsError( + code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.", + details: "") +} + +@objc class NiTestsNumberWrapper: NSObject, NSCopying { + @objc required init( + number: NSNumber, + type: Int, + ) { + self.number = number + self.type = type + } + func copy(with zone: NSZone? = nil) -> Any { + return Self(number: number, type: type) + } + @objc var number: NSNumber + @objc var type: Int + static func == (lhs: NiTestsNumberWrapper, rhs: NiTestsNumberWrapper) -> Bool { + return lhs.number == rhs.number && lhs.type == rhs.type + } + + override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? NiTestsNumberWrapper else { + return false + } + return self == other + } + + override var hash: Int { + return number.hashValue ^ type.hashValue + } + +} + +private func wrapNumber(number: Any) -> NiTestsNumberWrapper { + switch number { + case let value as Int: + return NiTestsNumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Int64: + return NiTestsNumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Double: + return NiTestsNumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Float: + return NiTestsNumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Bool: + return NiTestsNumberWrapper(number: NSNumber(value: value), type: 3) + + case let value as NIAnEnum: + return NiTestsNumberWrapper(number: NSNumber(value: value.rawValue), type: 4) + case let value as NIAnotherEnum: + return NiTestsNumberWrapper(number: NSNumber(value: value.rawValue), type: 5) + default: + return NiTestsNumberWrapper(number: NSNumber(value: 0), type: 0) + } +} + +private func unwrapNumber(wrappedNumber: NiTestsNumberWrapper) -> Any { + switch wrappedNumber.type { + case 1: + return wrappedNumber.number.int64Value + case 2: + return wrappedNumber.number.doubleValue + case 3: + return wrappedNumber.number.boolValue + case 4: + return NIAnEnum(rawValue: wrappedNumber.number.intValue)! + case 5: + return NIAnotherEnum(rawValue: wrappedNumber.number.intValue)! + default: + return wrappedNumber.number.int64Value + } +} + +private func numberCodec(number: Any) -> Int { + switch number { + case is Int: + return 1 + case is Double: + return 2 + case is Float: + return 2 + case is Bool: + return 3 + case is NIAnEnum: + return 4 + case is NIAnotherEnum: + return 5 + default: + return 0 + } +} +// Enum to represent the Dart TypedData types +enum NiTestsMyDataType: Int { + case uint8 = 0 + case int32 = 1 + case int64 = 2 + case float32 = 3 + case float64 = 4 +} + +@available(iOS 13, macOS 10.15, *) +@objc public class NiTestsPigeonTypedData: NSObject { + @objc public let data: NSData + @objc public let type: Int + + @objc public init(data: NSData, type: Int) { + self.data = data + self.type = type + } + + public init(_ data: [UInt8]) { + self.data = NSData(bytes: data, length: data.count) + self.type = NiTestsMyDataType.uint8.rawValue + } + + public init(_ data: [Int32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NiTestsMyDataType.int32.rawValue + } + + public init(_ data: [Int64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NiTestsMyDataType.int64.rawValue + } + + public init(_ data: [Float32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NiTestsMyDataType.float32.rawValue + } + + public init(_ data: [Float64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NiTestsMyDataType.float64.rawValue + } + + /// Returns the data as a [UInt8] array, if the type is .uint8 + public func toUint8Array() -> [UInt8]? { + guard type == NiTestsMyDataType.uint8.rawValue else { return nil } + return [UInt8](data as Data) + } + + /// Returns the data as a [Int32] array, if the type is .int32 + public func toInt32Array() -> [Int32]? { + guard type == NiTestsMyDataType.int32.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Int32](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } + + /// Returns the data as a [Int64] array, if the type is .int64 + public func toInt64Array() -> [Int64]? { + guard type == NiTestsMyDataType.int64.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Int64](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } + + /// Returns the data as a [Float32] array, if the type is .float32 + public func toFloat32Array() -> [Float32]? { + guard type == NiTestsMyDataType.float32.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Float32](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } + + /// Returns the data as a [Float64] array (Array), if the type is .float64 + public func toFloat64Array() -> [Double]? { + guard type == NiTestsMyDataType.float64.rawValue else { return nil } + guard data.length % MemoryLayout.size == 0 else { return nil } + let count = data.length / MemoryLayout.size + var array = [Double](repeating: 0, count: count) + data.getBytes(&array, length: data.length) + return array + } +} + +private func isNullish(_ value: Any?) -> Bool { + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull || innerValue is NiTestsPigeonInternalNull +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} + +private func doubleEqualsNiTests(_ lhs: Double, _ rhs: Double) -> Bool { + return (lhs.isNaN && rhs.isNaN) || lhs == rhs +} + +private func doubleHashNiTests(_ value: Double, _ hasher: inout Hasher) { + if value.isNaN { + hasher.combine(0x7FF8_0000_0000_0000) + } else { + // Normalize -0.0 to 0.0 + hasher.combine(value == 0 ? 0 : value) + } +} + +func deepEqualsNiTests(_ 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 (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs: + return true + + case is (Void, Void): + return true + + case (let lhsArray, let rhsArray) as ([Any?], [Any?]): + guard lhsArray.count == rhsArray.count else { return false } + for (index, element) in lhsArray.enumerated() { + if !deepEqualsNiTests(element, rhsArray[index]) { + return false + } + } + return true + + case (let lhsArray, let rhsArray) as ([Double], [Double]): + guard lhsArray.count == rhsArray.count else { return false } + for (index, element) in lhsArray.enumerated() { + if !doubleEqualsNiTests(element, rhsArray[index]) { + return false + } + } + return true + + case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): + guard lhsDictionary.count == rhsDictionary.count else { return false } + for (lhsKey, lhsValue) in lhsDictionary { + var found = false + for (rhsKey, rhsValue) in rhsDictionary { + if deepEqualsNiTests(lhsKey, rhsKey) { + if deepEqualsNiTests(lhsValue, rhsValue) { + found = true + break + } else { + return false + } + } + } + if !found { return false } + } + return true + + case (let lhs as Double, let rhs as Double): + return doubleEqualsNiTests(lhs, rhs) + + case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): + return lhsHashable == rhsHashable + + default: + return false + } +} + +func deepHashNiTests(value: Any?, hasher: inout Hasher) { + let cleanValue = nilOrValue(value) as Any? + if let cleanValue = cleanValue { + if let doubleValue = cleanValue as? Double { + doubleHashNiTests(doubleValue, &hasher) + } else if let valueList = cleanValue as? [Any?] { + for item in valueList { + deepHashNiTests(value: item, hasher: &hasher) + } + } else if let valueList = cleanValue as? [Double] { + for item in valueList { + doubleHashNiTests(item, &hasher) + } + } else if let valueDict = cleanValue as? [AnyHashable: Any?] { + var result = 0 + for (key, value) in valueDict { + var entryKeyHasher = Hasher() + deepHashNiTests(value: key, hasher: &entryKeyHasher) + var entryValueHasher = Hasher() + deepHashNiTests(value: value, hasher: &entryValueHasher) + result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize()) + } + hasher.combine(result) + } else if let hashableValue = cleanValue as? AnyHashable { + hasher.combine(hashableValue) + } else { + hasher.combine(String(describing: cleanValue)) + } + } else { + hasher.combine(0) + } +} + +@objc enum NIAnEnum: Int { + case one = 0 + case two = 1 + case three = 2 + case fortyTwo = 3 + case fourHundredTwentyTwo = 4 +} + +@objc enum NIAnotherEnum: Int { + case justInCase = 0 +} + +/// Generated class from Pigeon that represents data sent in messages. +struct NIUnusedClass: Hashable { + var aField: Any? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NIUnusedClass? { + let aField: Any? = pigeonVar_list[0] + + return NIUnusedClass( + aField: aField + ) + } + func toList() -> [Any?] { + return [ + aField + ] + } + static func == (lhs: NIUnusedClass, rhs: NIUnusedClass) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return deepEqualsNiTests(lhs.aField, rhs.aField) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NIUnusedClass") + deepHashNiTests(value: aField, hasher: &hasher) + } +} + +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@available(iOS 13, macOS 10.15, *) +@objc class NIUnusedClassBridge: NSObject { + @objc init( + aField: NSObject? = nil + ) { + self.aField = aField + } + @objc var aField: NSObject? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromSwift(_ pigeonVar_Class: NIUnusedClass?) -> NIUnusedClassBridge? { + if isNullish(pigeonVar_Class) { + return nil + } + return NIUnusedClassBridge( + aField: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.aField, isObject: true) + as? NSObject, + ) + } + func toSwift() -> NIUnusedClass { + return NIUnusedClass( + aField: _PigeonFfiCodec.readValue(value: aField), + ) + } +} + +/// A class containing all supported types. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct NIAllTypes: Hashable { + var aBool: Bool + var anInt: Int64 + var anInt64: Int64 + var aDouble: Double + var aByteArray: [UInt8] + var a4ByteArray: [Int32] + var a8ByteArray: [Int64] + var aFloatArray: [Float64] + var anEnum: NIAnEnum + var anotherEnum: NIAnotherEnum + var aString: String + var anObject: Any + var list: [Any?] + var stringList: [String] + var intList: [Int64] + var doubleList: [Double] + var boolList: [Bool] + var enumList: [NIAnEnum] + var objectList: [Any] + var listList: [[Any?]] + var mapList: [[AnyHashable?: Any?]] + var map: [AnyHashable?: Any?] + var stringMap: [String: String] + var intMap: [Int64: Int64] + var enumMap: [NIAnEnum: NIAnEnum] + var objectMap: [AnyHashable: Any] + var listMap: [Int64: [Any?]] + var mapMap: [Int64: [AnyHashable?: Any?]] + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NIAllTypes? { + let aBool = pigeonVar_list[0] as! Bool + let anInt = pigeonVar_list[1] as! Int64 + let anInt64 = pigeonVar_list[2] as! Int64 + let aDouble = pigeonVar_list[3] as! Double + let aByteArray = pigeonVar_list[4] as! [UInt8] + let a4ByteArray = pigeonVar_list[5] as! [Int32] + let a8ByteArray = pigeonVar_list[6] as! [Int64] + let aFloatArray = pigeonVar_list[7] as! [Float64] + let anEnum = pigeonVar_list[8] as! NIAnEnum + let anotherEnum = pigeonVar_list[9] as! NIAnotherEnum + let aString = pigeonVar_list[10] as! String + let anObject = pigeonVar_list[11]! + let list = pigeonVar_list[12] as! [Any?] + let stringList = pigeonVar_list[13] as! [String] + let intList = pigeonVar_list[14] as! [Int64] + let doubleList = pigeonVar_list[15] as! [Double] + let boolList = pigeonVar_list[16] as! [Bool] + let enumList = pigeonVar_list[17] as! [NIAnEnum] + let objectList = pigeonVar_list[18] as! [Any] + let listList = pigeonVar_list[19] as! [[Any?]] + let mapList = pigeonVar_list[20] as! [[AnyHashable?: Any?]] + let map = pigeonVar_list[21] as! [AnyHashable?: Any?] + let stringMap = pigeonVar_list[22] as! [String: String] + let intMap = pigeonVar_list[23] as! [Int64: Int64] + let enumMap = pigeonVar_list[24] as? [NIAnEnum: NIAnEnum] + let objectMap = pigeonVar_list[25] as! [AnyHashable: Any] + let listMap = pigeonVar_list[26] as! [Int64: [Any?]] + let mapMap = pigeonVar_list[27] as! [Int64: [AnyHashable?: Any?]] + + return NIAllTypes( + aBool: aBool, + anInt: anInt, + anInt64: anInt64, + aDouble: aDouble, + aByteArray: aByteArray, + a4ByteArray: a4ByteArray, + a8ByteArray: a8ByteArray, + aFloatArray: aFloatArray, + anEnum: anEnum, + anotherEnum: anotherEnum, + aString: aString, + anObject: anObject, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: objectList, + listList: listList, + mapList: mapList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap!, + objectMap: objectMap, + listMap: listMap, + mapMap: mapMap + ) + } + func toList() -> [Any?] { + return [ + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ] + } + static func == (lhs: NIAllTypes, rhs: NIAllTypes) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return deepEqualsNiTests(lhs.aBool, rhs.aBool) && deepEqualsNiTests(lhs.anInt, rhs.anInt) + && deepEqualsNiTests(lhs.anInt64, rhs.anInt64) && deepEqualsNiTests(lhs.aDouble, rhs.aDouble) + && deepEqualsNiTests(lhs.aByteArray, rhs.aByteArray) + && deepEqualsNiTests(lhs.a4ByteArray, rhs.a4ByteArray) + && deepEqualsNiTests(lhs.a8ByteArray, rhs.a8ByteArray) + && deepEqualsNiTests(lhs.aFloatArray, rhs.aFloatArray) + && deepEqualsNiTests(lhs.anEnum, rhs.anEnum) + && deepEqualsNiTests(lhs.anotherEnum, rhs.anotherEnum) + && deepEqualsNiTests(lhs.aString, rhs.aString) + && deepEqualsNiTests(lhs.anObject, rhs.anObject) && deepEqualsNiTests(lhs.list, rhs.list) + && deepEqualsNiTests(lhs.stringList, rhs.stringList) + && deepEqualsNiTests(lhs.intList, rhs.intList) + && deepEqualsNiTests(lhs.doubleList, rhs.doubleList) + && deepEqualsNiTests(lhs.boolList, rhs.boolList) + && deepEqualsNiTests(lhs.enumList, rhs.enumList) + && deepEqualsNiTests(lhs.objectList, rhs.objectList) + && deepEqualsNiTests(lhs.listList, rhs.listList) + && deepEqualsNiTests(lhs.mapList, rhs.mapList) && deepEqualsNiTests(lhs.map, rhs.map) + && deepEqualsNiTests(lhs.stringMap, rhs.stringMap) + && deepEqualsNiTests(lhs.intMap, rhs.intMap) && deepEqualsNiTests(lhs.enumMap, rhs.enumMap) + && deepEqualsNiTests(lhs.objectMap, rhs.objectMap) + && deepEqualsNiTests(lhs.listMap, rhs.listMap) && deepEqualsNiTests(lhs.mapMap, rhs.mapMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NIAllTypes") + deepHashNiTests(value: aBool, hasher: &hasher) + deepHashNiTests(value: anInt, hasher: &hasher) + deepHashNiTests(value: anInt64, hasher: &hasher) + deepHashNiTests(value: aDouble, hasher: &hasher) + deepHashNiTests(value: aByteArray, hasher: &hasher) + deepHashNiTests(value: a4ByteArray, hasher: &hasher) + deepHashNiTests(value: a8ByteArray, hasher: &hasher) + deepHashNiTests(value: aFloatArray, hasher: &hasher) + deepHashNiTests(value: anEnum, hasher: &hasher) + deepHashNiTests(value: anotherEnum, hasher: &hasher) + deepHashNiTests(value: aString, hasher: &hasher) + deepHashNiTests(value: anObject, hasher: &hasher) + deepHashNiTests(value: list, hasher: &hasher) + deepHashNiTests(value: stringList, hasher: &hasher) + deepHashNiTests(value: intList, hasher: &hasher) + deepHashNiTests(value: doubleList, hasher: &hasher) + deepHashNiTests(value: boolList, hasher: &hasher) + deepHashNiTests(value: enumList, hasher: &hasher) + deepHashNiTests(value: objectList, hasher: &hasher) + deepHashNiTests(value: listList, hasher: &hasher) + deepHashNiTests(value: mapList, hasher: &hasher) + deepHashNiTests(value: map, hasher: &hasher) + deepHashNiTests(value: stringMap, hasher: &hasher) + deepHashNiTests(value: intMap, hasher: &hasher) + deepHashNiTests(value: enumMap, hasher: &hasher) + deepHashNiTests(value: objectMap, hasher: &hasher) + deepHashNiTests(value: listMap, hasher: &hasher) + deepHashNiTests(value: mapMap, hasher: &hasher) + } +} + +/// A class containing all supported types. +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@available(iOS 13, macOS 10.15, *) +@objc class NIAllTypesBridge: NSObject { + @objc init( + aBool: Bool, + anInt: Int64, + anInt64: Int64, + aDouble: Double, + aByteArray: NiTestsPigeonTypedData, + a4ByteArray: NiTestsPigeonTypedData, + a8ByteArray: NiTestsPigeonTypedData, + aFloatArray: NiTestsPigeonTypedData, + anEnum: NIAnEnum, + anotherEnum: NIAnotherEnum, + aString: NSString, + anObject: NSObject, + list: [NSObject], + stringList: [NSObject], + intList: [NSObject], + doubleList: [NSObject], + boolList: [NSObject], + enumList: [NSObject], + objectList: [NSObject], + listList: [NSObject], + mapList: [NSObject], + map: [NSObject: NSObject], + stringMap: [NSObject: NSObject], + intMap: [NSObject: NSObject], + enumMap: [NSObject: NSObject], + objectMap: [NSObject: NSObject], + listMap: [NSObject: NSObject], + mapMap: [NSObject: NSObject] + ) { + self.aBool = aBool + self.anInt = anInt + self.anInt64 = anInt64 + self.aDouble = aDouble + self.aByteArray = aByteArray + self.a4ByteArray = a4ByteArray + self.a8ByteArray = a8ByteArray + self.aFloatArray = aFloatArray + self.anEnum = anEnum + self.anotherEnum = anotherEnum + self.aString = aString + self.anObject = anObject + self.list = list + self.stringList = stringList + self.intList = intList + self.doubleList = doubleList + self.boolList = boolList + self.enumList = enumList + self.objectList = objectList + self.listList = listList + self.mapList = mapList + self.map = map + self.stringMap = stringMap + self.intMap = intMap + self.enumMap = enumMap + self.objectMap = objectMap + self.listMap = listMap + self.mapMap = mapMap + } + @objc var aBool: Bool + @objc var anInt: Int64 + @objc var anInt64: Int64 + @objc var aDouble: Double + @objc var aByteArray: NiTestsPigeonTypedData + @objc var a4ByteArray: NiTestsPigeonTypedData + @objc var a8ByteArray: NiTestsPigeonTypedData + @objc var aFloatArray: NiTestsPigeonTypedData + @objc var anEnum: NIAnEnum + @objc var anotherEnum: NIAnotherEnum + @objc var aString: NSString + @objc var anObject: NSObject + @objc var list: [NSObject] + @objc var stringList: [NSObject] + @objc var intList: [NSObject] + @objc var doubleList: [NSObject] + @objc var boolList: [NSObject] + @objc var enumList: [NSObject] + @objc var objectList: [NSObject] + @objc var listList: [NSObject] + @objc var mapList: [NSObject] + @objc var map: [NSObject: NSObject] + @objc var stringMap: [NSObject: NSObject] + @objc var intMap: [NSObject: NSObject] + @objc var enumMap: [NSObject: NSObject] + @objc var objectMap: [NSObject: NSObject] + @objc var listMap: [NSObject: NSObject] + @objc var mapMap: [NSObject: NSObject] + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromSwift(_ pigeonVar_Class: NIAllTypes?) -> NIAllTypesBridge? { + if isNullish(pigeonVar_Class) { + return nil + } + return NIAllTypesBridge( + aBool: pigeonVar_Class!.aBool, + anInt: pigeonVar_Class!.anInt, + anInt64: pigeonVar_Class!.anInt64, + aDouble: pigeonVar_Class!.aDouble, + aByteArray: NiTestsPigeonTypedData(pigeonVar_Class!.aByteArray), + a4ByteArray: NiTestsPigeonTypedData(pigeonVar_Class!.a4ByteArray), + a8ByteArray: NiTestsPigeonTypedData(pigeonVar_Class!.a8ByteArray), + aFloatArray: NiTestsPigeonTypedData(pigeonVar_Class!.aFloatArray), + anEnum: pigeonVar_Class!.anEnum, + anotherEnum: pigeonVar_Class!.anotherEnum, + aString: pigeonVar_Class!.aString as NSString, + anObject: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.anObject, isObject: true) + as! NSObject, + list: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.list) as! [NSObject], + stringList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.stringList) as! [NSObject], + intList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.intList) as! [NSObject], + doubleList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.doubleList) as! [NSObject], + boolList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.boolList) as! [NSObject], + enumList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.enumList) as! [NSObject], + objectList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.objectList) as! [NSObject], + listList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.listList) as! [NSObject], + mapList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.mapList) as! [NSObject], + map: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.map) as! [NSObject: NSObject], + stringMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.stringMap) + as! [NSObject: NSObject], + intMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.intMap) as! [NSObject: NSObject], + enumMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.enumMap) as! [NSObject: NSObject], + objectMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.objectMap) + as! [NSObject: NSObject], + listMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.listMap) as! [NSObject: NSObject], + mapMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.mapMap) as! [NSObject: NSObject], + ) + } + func toSwift() -> NIAllTypes { + return NIAllTypes( + aBool: aBool, + anInt: anInt, + anInt64: anInt64, + aDouble: aDouble, + aByteArray: aByteArray.toUint8Array()!, + a4ByteArray: a4ByteArray.toInt32Array()!, + a8ByteArray: a8ByteArray.toInt64Array()!, + aFloatArray: aFloatArray.toFloat64Array()!, + anEnum: anEnum, + anotherEnum: anotherEnum, + aString: aString as String, + anObject: _PigeonFfiCodec.readValue(value: anObject)!, + list: _PigeonFfiCodec.readValue(value: list as NSObject) as! [Any?], + stringList: _PigeonFfiCodec.readValue(value: stringList as NSObject, type: "String") + as! [String], + intList: _PigeonFfiCodec.readValue(value: intList as NSObject, type: "int") as! [Int64], + doubleList: _PigeonFfiCodec.readValue(value: doubleList as NSObject, type: "double") + as! [Double], + boolList: _PigeonFfiCodec.readValue(value: boolList as NSObject, type: "bool") as! [Bool], + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum], + objectList: _PigeonFfiCodec.readValue(value: objectList as NSObject, type: "Object") + as! [Any], + listList: _PigeonFfiCodec.readValue(value: listList as NSObject) as! [[Any?]], + mapList: _PigeonFfiCodec.readValue(value: mapList as NSObject) as! [[AnyHashable?: Any?]], + map: _PigeonFfiCodec.readValue(value: map as NSObject) as! [AnyHashable?: Any?], + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String: String], + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64: Int64], + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") as! [NIAnEnum: NIAnEnum], + objectMap: _PigeonFfiCodec.readValue( + value: objectMap as NSObject, type: "Object", type2: "Object") as! [AnyHashable: Any], + listMap: _PigeonFfiCodec.readValue(value: listMap as NSObject, type: "int") + as! [Int64: [Any?]], + mapMap: _PigeonFfiCodec.readValue(value: mapMap as NSObject, type: "int") + as! [Int64: [AnyHashable?: Any?]], + ) + } +} + +/// A class containing all supported nullable types. +/// +/// Generated class from Pigeon that represents data sent in messages. +class NIAllNullableTypes: Hashable { + init( + aNullableBool: Bool? = nil, + aNullableInt: Int64? = nil, + aNullableInt64: Int64? = nil, + aNullableDouble: Double? = nil, + aNullableByteArray: [UInt8]? = nil, + aNullable4ByteArray: [Int32]? = nil, + aNullable8ByteArray: [Int64]? = nil, + aNullableFloatArray: [Float64]? = nil, + aNullableEnum: NIAnEnum? = nil, + anotherNullableEnum: NIAnotherEnum? = nil, + aNullableString: String? = nil, + aNullableObject: Any? = nil, + allNullableTypes: NIAllNullableTypes? = nil, + list: [Any?]? = nil, + stringList: [String?]? = nil, + intList: [Int64?]? = nil, + doubleList: [Double?]? = nil, + boolList: [Bool?]? = nil, + enumList: [NIAnEnum?]? = nil, + objectList: [Any?]? = nil, + listList: [[Any?]?]? = nil, + mapList: [[AnyHashable?: Any?]?]? = nil, + recursiveClassList: [NIAllNullableTypes?]? = nil, + map: [AnyHashable?: Any?]? = nil, + stringMap: [String?: String?]? = nil, + intMap: [Int64?: Int64?]? = nil, + enumMap: [NIAnEnum?: NIAnEnum?]? = nil, + objectMap: [AnyHashable?: Any?]? = nil, + listMap: [Int64?: [Any?]?]? = nil, + mapMap: [Int64?: [AnyHashable?: Any?]?]? = nil, + recursiveClassMap: [Int64?: NIAllNullableTypes?]? = nil + ) { + self.aNullableBool = aNullableBool + self.aNullableInt = aNullableInt + self.aNullableInt64 = aNullableInt64 + self.aNullableDouble = aNullableDouble + self.aNullableByteArray = aNullableByteArray + self.aNullable4ByteArray = aNullable4ByteArray + self.aNullable8ByteArray = aNullable8ByteArray + self.aNullableFloatArray = aNullableFloatArray + self.aNullableEnum = aNullableEnum + self.anotherNullableEnum = anotherNullableEnum + self.aNullableString = aNullableString + self.aNullableObject = aNullableObject + self.allNullableTypes = allNullableTypes + self.list = list + self.stringList = stringList + self.intList = intList + self.doubleList = doubleList + self.boolList = boolList + self.enumList = enumList + self.objectList = objectList + self.listList = listList + self.mapList = mapList + self.recursiveClassList = recursiveClassList + self.map = map + self.stringMap = stringMap + self.intMap = intMap + self.enumMap = enumMap + self.objectMap = objectMap + self.listMap = listMap + self.mapMap = mapMap + self.recursiveClassMap = recursiveClassMap + } + var aNullableBool: Bool? + var aNullableInt: Int64? + var aNullableInt64: Int64? + var aNullableDouble: Double? + var aNullableByteArray: [UInt8]? + var aNullable4ByteArray: [Int32]? + var aNullable8ByteArray: [Int64]? + var aNullableFloatArray: [Float64]? + var aNullableEnum: NIAnEnum? + var anotherNullableEnum: NIAnotherEnum? + var aNullableString: String? + var aNullableObject: Any? + var allNullableTypes: NIAllNullableTypes? + var list: [Any?]? + var stringList: [String?]? + var intList: [Int64?]? + var doubleList: [Double?]? + var boolList: [Bool?]? + var enumList: [NIAnEnum?]? + var objectList: [Any?]? + var listList: [[Any?]?]? + var mapList: [[AnyHashable?: Any?]?]? + var recursiveClassList: [NIAllNullableTypes?]? + var map: [AnyHashable?: Any?]? + var stringMap: [String?: String?]? + var intMap: [Int64?: Int64?]? + var enumMap: [NIAnEnum?: NIAnEnum?]? + var objectMap: [AnyHashable?: Any?]? + var listMap: [Int64?: [Any?]?]? + var mapMap: [Int64?: [AnyHashable?: Any?]?]? + var recursiveClassMap: [Int64?: NIAllNullableTypes?]? + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NIAllNullableTypes? { + let aNullableBool: Bool? = nilOrValue(pigeonVar_list[0]) + let aNullableInt: Int64? = nilOrValue(pigeonVar_list[1]) + let aNullableInt64: Int64? = nilOrValue(pigeonVar_list[2]) + let aNullableDouble: Double? = nilOrValue(pigeonVar_list[3]) + let aNullableByteArray: [UInt8]? = nilOrValue(pigeonVar_list[4]) + let aNullable4ByteArray: [Int32]? = nilOrValue(pigeonVar_list[5]) + let aNullable8ByteArray: [Int64]? = nilOrValue(pigeonVar_list[6]) + let aNullableFloatArray: [Float64]? = nilOrValue(pigeonVar_list[7]) + let aNullableEnum: NIAnEnum? = nilOrValue(pigeonVar_list[8]) + let anotherNullableEnum: NIAnotherEnum? = nilOrValue(pigeonVar_list[9]) + let aNullableString: String? = nilOrValue(pigeonVar_list[10]) + let aNullableObject: Any? = pigeonVar_list[11] + let allNullableTypes: NIAllNullableTypes? = nilOrValue(pigeonVar_list[12]) + let list: [Any?]? = nilOrValue(pigeonVar_list[13]) + let stringList: [String?]? = nilOrValue(pigeonVar_list[14]) + let intList: [Int64?]? = nilOrValue(pigeonVar_list[15]) + let doubleList: [Double?]? = nilOrValue(pigeonVar_list[16]) + let boolList: [Bool?]? = nilOrValue(pigeonVar_list[17]) + let enumList: [NIAnEnum?]? = nilOrValue(pigeonVar_list[18]) + let objectList: [Any?]? = nilOrValue(pigeonVar_list[19]) + let listList: [[Any?]?]? = nilOrValue(pigeonVar_list[20]) + let mapList: [[AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[21]) + let recursiveClassList: [NIAllNullableTypes?]? = nilOrValue(pigeonVar_list[22]) + let map: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[23]) + let stringMap: [String?: String?]? = nilOrValue(pigeonVar_list[24]) + let intMap: [Int64?: Int64?]? = nilOrValue(pigeonVar_list[25]) + let enumMap: [NIAnEnum?: NIAnEnum?]? = pigeonVar_list[26] as? [NIAnEnum?: NIAnEnum?] + let objectMap: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[27]) + let listMap: [Int64?: [Any?]?]? = nilOrValue(pigeonVar_list[28]) + let mapMap: [Int64?: [AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[29]) + let recursiveClassMap: [Int64?: NIAllNullableTypes?]? = nilOrValue(pigeonVar_list[30]) + + return NIAllNullableTypes( + aNullableBool: aNullableBool, + aNullableInt: aNullableInt, + aNullableInt64: aNullableInt64, + aNullableDouble: aNullableDouble, + aNullableByteArray: aNullableByteArray, + aNullable4ByteArray: aNullable4ByteArray, + aNullable8ByteArray: aNullable8ByteArray, + aNullableFloatArray: aNullableFloatArray, + aNullableEnum: aNullableEnum, + anotherNullableEnum: anotherNullableEnum, + aNullableString: aNullableString, + aNullableObject: aNullableObject, + allNullableTypes: allNullableTypes, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: objectList, + listList: listList, + mapList: mapList, + recursiveClassList: recursiveClassList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: objectMap, + listMap: listMap, + mapMap: mapMap, + recursiveClassMap: recursiveClassMap + ) + } + func toList() -> [Any?] { + return [ + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap, + ] + } + static func == (lhs: NIAllNullableTypes, rhs: NIAllNullableTypes) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + if lhs === rhs { + return true + } + return deepEqualsNiTests(lhs.aNullableBool, rhs.aNullableBool) + && deepEqualsNiTests(lhs.aNullableInt, rhs.aNullableInt) + && deepEqualsNiTests(lhs.aNullableInt64, rhs.aNullableInt64) + && deepEqualsNiTests(lhs.aNullableDouble, rhs.aNullableDouble) + && deepEqualsNiTests(lhs.aNullableByteArray, rhs.aNullableByteArray) + && deepEqualsNiTests(lhs.aNullable4ByteArray, rhs.aNullable4ByteArray) + && deepEqualsNiTests(lhs.aNullable8ByteArray, rhs.aNullable8ByteArray) + && deepEqualsNiTests(lhs.aNullableFloatArray, rhs.aNullableFloatArray) + && deepEqualsNiTests(lhs.aNullableEnum, rhs.aNullableEnum) + && deepEqualsNiTests(lhs.anotherNullableEnum, rhs.anotherNullableEnum) + && deepEqualsNiTests(lhs.aNullableString, rhs.aNullableString) + && deepEqualsNiTests(lhs.aNullableObject, rhs.aNullableObject) + && deepEqualsNiTests(lhs.allNullableTypes, rhs.allNullableTypes) + && deepEqualsNiTests(lhs.list, rhs.list) && deepEqualsNiTests(lhs.stringList, rhs.stringList) + && deepEqualsNiTests(lhs.intList, rhs.intList) + && deepEqualsNiTests(lhs.doubleList, rhs.doubleList) + && deepEqualsNiTests(lhs.boolList, rhs.boolList) + && deepEqualsNiTests(lhs.enumList, rhs.enumList) + && deepEqualsNiTests(lhs.objectList, rhs.objectList) + && deepEqualsNiTests(lhs.listList, rhs.listList) + && deepEqualsNiTests(lhs.mapList, rhs.mapList) + && deepEqualsNiTests(lhs.recursiveClassList, rhs.recursiveClassList) + && deepEqualsNiTests(lhs.map, rhs.map) && deepEqualsNiTests(lhs.stringMap, rhs.stringMap) + && deepEqualsNiTests(lhs.intMap, rhs.intMap) && deepEqualsNiTests(lhs.enumMap, rhs.enumMap) + && deepEqualsNiTests(lhs.objectMap, rhs.objectMap) + && deepEqualsNiTests(lhs.listMap, rhs.listMap) && deepEqualsNiTests(lhs.mapMap, rhs.mapMap) + && deepEqualsNiTests(lhs.recursiveClassMap, rhs.recursiveClassMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NIAllNullableTypes") + deepHashNiTests(value: aNullableBool, hasher: &hasher) + deepHashNiTests(value: aNullableInt, hasher: &hasher) + deepHashNiTests(value: aNullableInt64, hasher: &hasher) + deepHashNiTests(value: aNullableDouble, hasher: &hasher) + deepHashNiTests(value: aNullableByteArray, hasher: &hasher) + deepHashNiTests(value: aNullable4ByteArray, hasher: &hasher) + deepHashNiTests(value: aNullable8ByteArray, hasher: &hasher) + deepHashNiTests(value: aNullableFloatArray, hasher: &hasher) + deepHashNiTests(value: aNullableEnum, hasher: &hasher) + deepHashNiTests(value: anotherNullableEnum, hasher: &hasher) + deepHashNiTests(value: aNullableString, hasher: &hasher) + deepHashNiTests(value: aNullableObject, hasher: &hasher) + deepHashNiTests(value: allNullableTypes, hasher: &hasher) + deepHashNiTests(value: list, hasher: &hasher) + deepHashNiTests(value: stringList, hasher: &hasher) + deepHashNiTests(value: intList, hasher: &hasher) + deepHashNiTests(value: doubleList, hasher: &hasher) + deepHashNiTests(value: boolList, hasher: &hasher) + deepHashNiTests(value: enumList, hasher: &hasher) + deepHashNiTests(value: objectList, hasher: &hasher) + deepHashNiTests(value: listList, hasher: &hasher) + deepHashNiTests(value: mapList, hasher: &hasher) + deepHashNiTests(value: recursiveClassList, hasher: &hasher) + deepHashNiTests(value: map, hasher: &hasher) + deepHashNiTests(value: stringMap, hasher: &hasher) + deepHashNiTests(value: intMap, hasher: &hasher) + deepHashNiTests(value: enumMap, hasher: &hasher) + deepHashNiTests(value: objectMap, hasher: &hasher) + deepHashNiTests(value: listMap, hasher: &hasher) + deepHashNiTests(value: mapMap, hasher: &hasher) + deepHashNiTests(value: recursiveClassMap, hasher: &hasher) + } +} + +/// A class containing all supported nullable types. +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@available(iOS 13, macOS 10.15, *) +@objc class NIAllNullableTypesBridge: NSObject { + @objc init( + aNullableBool: NSNumber? = nil, + aNullableInt: NSNumber? = nil, + aNullableInt64: NSNumber? = nil, + aNullableDouble: NSNumber? = nil, + aNullableByteArray: NiTestsPigeonTypedData? = nil, + aNullable4ByteArray: NiTestsPigeonTypedData? = nil, + aNullable8ByteArray: NiTestsPigeonTypedData? = nil, + aNullableFloatArray: NiTestsPigeonTypedData? = nil, + aNullableEnum: NSNumber? = nil, + anotherNullableEnum: NSNumber? = nil, + aNullableString: NSString? = nil, + aNullableObject: NSObject? = nil, + allNullableTypes: NIAllNullableTypesBridge? = nil, + list: [NSObject]? = nil, + stringList: [NSObject]? = nil, + intList: [NSObject]? = nil, + doubleList: [NSObject]? = nil, + boolList: [NSObject]? = nil, + enumList: [NSObject]? = nil, + objectList: [NSObject]? = nil, + listList: [NSObject]? = nil, + mapList: [NSObject]? = nil, + recursiveClassList: [NSObject]? = nil, + map: [NSObject: NSObject]? = nil, + stringMap: [NSObject: NSObject]? = nil, + intMap: [NSObject: NSObject]? = nil, + enumMap: [NSObject: NSObject]? = nil, + objectMap: [NSObject: NSObject]? = nil, + listMap: [NSObject: NSObject]? = nil, + mapMap: [NSObject: NSObject]? = nil, + recursiveClassMap: [NSObject: NSObject]? = nil + ) { + self.aNullableBool = aNullableBool + self.aNullableInt = aNullableInt + self.aNullableInt64 = aNullableInt64 + self.aNullableDouble = aNullableDouble + self.aNullableByteArray = aNullableByteArray + self.aNullable4ByteArray = aNullable4ByteArray + self.aNullable8ByteArray = aNullable8ByteArray + self.aNullableFloatArray = aNullableFloatArray + self.aNullableEnum = aNullableEnum + self.anotherNullableEnum = anotherNullableEnum + self.aNullableString = aNullableString + self.aNullableObject = aNullableObject + self.allNullableTypes = allNullableTypes + self.list = list + self.stringList = stringList + self.intList = intList + self.doubleList = doubleList + self.boolList = boolList + self.enumList = enumList + self.objectList = objectList + self.listList = listList + self.mapList = mapList + self.recursiveClassList = recursiveClassList + self.map = map + self.stringMap = stringMap + self.intMap = intMap + self.enumMap = enumMap + self.objectMap = objectMap + self.listMap = listMap + self.mapMap = mapMap + self.recursiveClassMap = recursiveClassMap + } + @objc var aNullableBool: NSNumber? + @objc var aNullableInt: NSNumber? + @objc var aNullableInt64: NSNumber? + @objc var aNullableDouble: NSNumber? + @objc var aNullableByteArray: NiTestsPigeonTypedData? + @objc var aNullable4ByteArray: NiTestsPigeonTypedData? + @objc var aNullable8ByteArray: NiTestsPigeonTypedData? + @objc var aNullableFloatArray: NiTestsPigeonTypedData? + @objc var aNullableEnum: NSNumber? + @objc var anotherNullableEnum: NSNumber? + @objc var aNullableString: NSString? + @objc var aNullableObject: NSObject? + @objc var allNullableTypes: NIAllNullableTypesBridge? + @objc var list: [NSObject]? + @objc var stringList: [NSObject]? + @objc var intList: [NSObject]? + @objc var doubleList: [NSObject]? + @objc var boolList: [NSObject]? + @objc var enumList: [NSObject]? + @objc var objectList: [NSObject]? + @objc var listList: [NSObject]? + @objc var mapList: [NSObject]? + @objc var recursiveClassList: [NSObject]? + @objc var map: [NSObject: NSObject]? + @objc var stringMap: [NSObject: NSObject]? + @objc var intMap: [NSObject: NSObject]? + @objc var enumMap: [NSObject: NSObject]? + @objc var objectMap: [NSObject: NSObject]? + @objc var listMap: [NSObject: NSObject]? + @objc var mapMap: [NSObject: NSObject]? + @objc var recursiveClassMap: [NSObject: NSObject]? + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromSwift(_ pigeonVar_Class: NIAllNullableTypes?) -> NIAllNullableTypesBridge? { + if isNullish(pigeonVar_Class) { + return nil + } + return NIAllNullableTypesBridge( + aNullableBool: isNullish(pigeonVar_Class!.aNullableBool) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableBool!), + aNullableInt: isNullish(pigeonVar_Class!.aNullableInt) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt!), + aNullableInt64: isNullish(pigeonVar_Class!.aNullableInt64) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt64!), + aNullableDouble: isNullish(pigeonVar_Class!.aNullableDouble) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableDouble!), + aNullableByteArray: isNullish(pigeonVar_Class!.aNullableByteArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullableByteArray!), + aNullable4ByteArray: isNullish(pigeonVar_Class!.aNullable4ByteArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullable4ByteArray!), + aNullable8ByteArray: isNullish(pigeonVar_Class!.aNullable8ByteArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullable8ByteArray!), + aNullableFloatArray: isNullish(pigeonVar_Class!.aNullableFloatArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullableFloatArray!), + aNullableEnum: isNullish(pigeonVar_Class!.aNullableEnum) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableEnum!.rawValue), + anotherNullableEnum: isNullish(pigeonVar_Class!.anotherNullableEnum) + ? nil : NSNumber(value: pigeonVar_Class!.anotherNullableEnum!.rawValue), + aNullableString: pigeonVar_Class!.aNullableString as NSString?, + aNullableObject: _PigeonFfiCodec.writeValue( + value: pigeonVar_Class!.aNullableObject, isObject: true) as? NSObject, + allNullableTypes: NIAllNullableTypesBridge.fromSwift(pigeonVar_Class!.allNullableTypes), + list: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.list) as? [NSObject], + stringList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.stringList) as? [NSObject], + intList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.intList) as? [NSObject], + doubleList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.doubleList) as? [NSObject], + boolList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.boolList) as? [NSObject], + enumList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.enumList) as? [NSObject], + objectList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.objectList) as? [NSObject], + listList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.listList) as? [NSObject], + mapList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.mapList) as? [NSObject], + recursiveClassList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.recursiveClassList) + as? [NSObject], + map: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.map) as? [NSObject: NSObject], + stringMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.stringMap) + as? [NSObject: NSObject], + intMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.intMap) as? [NSObject: NSObject], + enumMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.enumMap) as? [NSObject: NSObject], + objectMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.objectMap) + as? [NSObject: NSObject], + listMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.listMap) as? [NSObject: NSObject], + mapMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.mapMap) as? [NSObject: NSObject], + recursiveClassMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.recursiveClassMap) + as? [NSObject: NSObject], + ) + } + func toSwift() -> NIAllNullableTypes { + return NIAllNullableTypes( + aNullableBool: isNullish(aNullableBool) ? nil : aNullableBool!.boolValue, + aNullableInt: isNullish(aNullableInt) ? nil : aNullableInt!.int64Value, + aNullableInt64: isNullish(aNullableInt64) ? nil : aNullableInt64!.int64Value, + aNullableDouble: isNullish(aNullableDouble) ? nil : aNullableDouble!.doubleValue, + aNullableByteArray: isNullish(aNullableByteArray) ? nil : aNullableByteArray!.toUint8Array(), + aNullable4ByteArray: isNullish(aNullable4ByteArray) + ? nil : aNullable4ByteArray!.toInt32Array(), + aNullable8ByteArray: isNullish(aNullable8ByteArray) + ? nil : aNullable8ByteArray!.toInt64Array(), + aNullableFloatArray: isNullish(aNullableFloatArray) + ? nil : aNullableFloatArray!.toFloat64Array(), + aNullableEnum: isNullish(aNullableEnum) + ? nil : NIAnEnum.init(rawValue: aNullableEnum!.intValue), + anotherNullableEnum: isNullish(anotherNullableEnum) + ? nil : NIAnotherEnum.init(rawValue: anotherNullableEnum!.intValue), + aNullableString: aNullableString as String?, + aNullableObject: _PigeonFfiCodec.readValue(value: aNullableObject), + allNullableTypes: isNullish(allNullableTypes) ? nil : allNullableTypes!.toSwift(), + list: _PigeonFfiCodec.readValue(value: list as NSObject?) as? [Any?], + stringList: _PigeonFfiCodec.readValue(value: stringList as NSObject?, type: "String") + as? [String?], + intList: _PigeonFfiCodec.readValue(value: intList as NSObject?, type: "int") as? [Int64?], + doubleList: _PigeonFfiCodec.readValue(value: doubleList as NSObject?, type: "double") + as? [Double?], + boolList: _PigeonFfiCodec.readValue(value: boolList as NSObject?, type: "bool") as? [Bool?], + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum?], + objectList: _PigeonFfiCodec.readValue(value: objectList as NSObject?, type: "Object") + as? [Any?], + listList: _PigeonFfiCodec.readValue(value: listList as NSObject?) as? [[Any?]?], + mapList: _PigeonFfiCodec.readValue(value: mapList as NSObject?) as? [[AnyHashable?: Any?]?], + recursiveClassList: _PigeonFfiCodec.readValue( + value: recursiveClassList as NSObject?, type: "NIAllNullableTypes") + as? [NIAllNullableTypes?], + map: _PigeonFfiCodec.readValue(value: map as NSObject?) as? [AnyHashable?: Any?], + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String?: String?], + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64?: Int64?], + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum?: NIAnEnum?], + objectMap: _PigeonFfiCodec.readValue( + value: objectMap as NSObject?, type: "Object", type2: "Object") as? [AnyHashable?: Any?], + listMap: _PigeonFfiCodec.readValue(value: listMap as NSObject?, type: "int") + as? [Int64?: [Any?]?], + mapMap: _PigeonFfiCodec.readValue(value: mapMap as NSObject?, type: "int") + as? [Int64?: [AnyHashable?: Any?]?], + recursiveClassMap: _PigeonFfiCodec.readValue( + value: recursiveClassMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64?: NIAllNullableTypes?], + ) + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NIAllNullableTypes] class is being used to +/// test Swift classes. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct NIAllNullableTypesWithoutRecursion: Hashable { + var aNullableBool: Bool? = nil + var aNullableInt: Int64? = nil + var aNullableInt64: Int64? = nil + var aNullableDouble: Double? = nil + var aNullableByteArray: [UInt8]? = nil + var aNullable4ByteArray: [Int32]? = nil + var aNullable8ByteArray: [Int64]? = nil + var aNullableFloatArray: [Float64]? = nil + var aNullableEnum: NIAnEnum? = nil + var anotherNullableEnum: NIAnotherEnum? = nil + var aNullableString: String? = nil + var aNullableObject: Any? = nil + var list: [Any?]? = nil + var stringList: [String?]? = nil + var intList: [Int64?]? = nil + var doubleList: [Double?]? = nil + var boolList: [Bool?]? = nil + var enumList: [NIAnEnum?]? = nil + var objectList: [Any?]? = nil + var listList: [[Any?]?]? = nil + var mapList: [[AnyHashable?: Any?]?]? = nil + var map: [AnyHashable?: Any?]? = nil + var stringMap: [String?: String?]? = nil + var intMap: [Int64?: Int64?]? = nil + var enumMap: [NIAnEnum?: NIAnEnum?]? = nil + var objectMap: [AnyHashable?: Any?]? = nil + var listMap: [Int64?: [Any?]?]? = nil + var mapMap: [Int64?: [AnyHashable?: Any?]?]? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NIAllNullableTypesWithoutRecursion? { + let aNullableBool: Bool? = nilOrValue(pigeonVar_list[0]) + let aNullableInt: Int64? = nilOrValue(pigeonVar_list[1]) + let aNullableInt64: Int64? = nilOrValue(pigeonVar_list[2]) + let aNullableDouble: Double? = nilOrValue(pigeonVar_list[3]) + let aNullableByteArray: [UInt8]? = nilOrValue(pigeonVar_list[4]) + let aNullable4ByteArray: [Int32]? = nilOrValue(pigeonVar_list[5]) + let aNullable8ByteArray: [Int64]? = nilOrValue(pigeonVar_list[6]) + let aNullableFloatArray: [Float64]? = nilOrValue(pigeonVar_list[7]) + let aNullableEnum: NIAnEnum? = nilOrValue(pigeonVar_list[8]) + let anotherNullableEnum: NIAnotherEnum? = nilOrValue(pigeonVar_list[9]) + let aNullableString: String? = nilOrValue(pigeonVar_list[10]) + let aNullableObject: Any? = pigeonVar_list[11] + let list: [Any?]? = nilOrValue(pigeonVar_list[12]) + let stringList: [String?]? = nilOrValue(pigeonVar_list[13]) + let intList: [Int64?]? = nilOrValue(pigeonVar_list[14]) + let doubleList: [Double?]? = nilOrValue(pigeonVar_list[15]) + let boolList: [Bool?]? = nilOrValue(pigeonVar_list[16]) + let enumList: [NIAnEnum?]? = nilOrValue(pigeonVar_list[17]) + let objectList: [Any?]? = nilOrValue(pigeonVar_list[18]) + let listList: [[Any?]?]? = nilOrValue(pigeonVar_list[19]) + let mapList: [[AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[20]) + let map: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[21]) + let stringMap: [String?: String?]? = nilOrValue(pigeonVar_list[22]) + let intMap: [Int64?: Int64?]? = nilOrValue(pigeonVar_list[23]) + let enumMap: [NIAnEnum?: NIAnEnum?]? = pigeonVar_list[24] as? [NIAnEnum?: NIAnEnum?] + let objectMap: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[25]) + let listMap: [Int64?: [Any?]?]? = nilOrValue(pigeonVar_list[26]) + let mapMap: [Int64?: [AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[27]) + + return NIAllNullableTypesWithoutRecursion( + aNullableBool: aNullableBool, + aNullableInt: aNullableInt, + aNullableInt64: aNullableInt64, + aNullableDouble: aNullableDouble, + aNullableByteArray: aNullableByteArray, + aNullable4ByteArray: aNullable4ByteArray, + aNullable8ByteArray: aNullable8ByteArray, + aNullableFloatArray: aNullableFloatArray, + aNullableEnum: aNullableEnum, + anotherNullableEnum: anotherNullableEnum, + aNullableString: aNullableString, + aNullableObject: aNullableObject, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: objectList, + listList: listList, + mapList: mapList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: objectMap, + listMap: listMap, + mapMap: mapMap + ) + } + func toList() -> [Any?] { + return [ + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ] + } + static func == (lhs: NIAllNullableTypesWithoutRecursion, rhs: NIAllNullableTypesWithoutRecursion) + -> Bool + { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return deepEqualsNiTests(lhs.aNullableBool, rhs.aNullableBool) + && deepEqualsNiTests(lhs.aNullableInt, rhs.aNullableInt) + && deepEqualsNiTests(lhs.aNullableInt64, rhs.aNullableInt64) + && deepEqualsNiTests(lhs.aNullableDouble, rhs.aNullableDouble) + && deepEqualsNiTests(lhs.aNullableByteArray, rhs.aNullableByteArray) + && deepEqualsNiTests(lhs.aNullable4ByteArray, rhs.aNullable4ByteArray) + && deepEqualsNiTests(lhs.aNullable8ByteArray, rhs.aNullable8ByteArray) + && deepEqualsNiTests(lhs.aNullableFloatArray, rhs.aNullableFloatArray) + && deepEqualsNiTests(lhs.aNullableEnum, rhs.aNullableEnum) + && deepEqualsNiTests(lhs.anotherNullableEnum, rhs.anotherNullableEnum) + && deepEqualsNiTests(lhs.aNullableString, rhs.aNullableString) + && deepEqualsNiTests(lhs.aNullableObject, rhs.aNullableObject) + && deepEqualsNiTests(lhs.list, rhs.list) && deepEqualsNiTests(lhs.stringList, rhs.stringList) + && deepEqualsNiTests(lhs.intList, rhs.intList) + && deepEqualsNiTests(lhs.doubleList, rhs.doubleList) + && deepEqualsNiTests(lhs.boolList, rhs.boolList) + && deepEqualsNiTests(lhs.enumList, rhs.enumList) + && deepEqualsNiTests(lhs.objectList, rhs.objectList) + && deepEqualsNiTests(lhs.listList, rhs.listList) + && deepEqualsNiTests(lhs.mapList, rhs.mapList) && deepEqualsNiTests(lhs.map, rhs.map) + && deepEqualsNiTests(lhs.stringMap, rhs.stringMap) + && deepEqualsNiTests(lhs.intMap, rhs.intMap) && deepEqualsNiTests(lhs.enumMap, rhs.enumMap) + && deepEqualsNiTests(lhs.objectMap, rhs.objectMap) + && deepEqualsNiTests(lhs.listMap, rhs.listMap) && deepEqualsNiTests(lhs.mapMap, rhs.mapMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NIAllNullableTypesWithoutRecursion") + deepHashNiTests(value: aNullableBool, hasher: &hasher) + deepHashNiTests(value: aNullableInt, hasher: &hasher) + deepHashNiTests(value: aNullableInt64, hasher: &hasher) + deepHashNiTests(value: aNullableDouble, hasher: &hasher) + deepHashNiTests(value: aNullableByteArray, hasher: &hasher) + deepHashNiTests(value: aNullable4ByteArray, hasher: &hasher) + deepHashNiTests(value: aNullable8ByteArray, hasher: &hasher) + deepHashNiTests(value: aNullableFloatArray, hasher: &hasher) + deepHashNiTests(value: aNullableEnum, hasher: &hasher) + deepHashNiTests(value: anotherNullableEnum, hasher: &hasher) + deepHashNiTests(value: aNullableString, hasher: &hasher) + deepHashNiTests(value: aNullableObject, hasher: &hasher) + deepHashNiTests(value: list, hasher: &hasher) + deepHashNiTests(value: stringList, hasher: &hasher) + deepHashNiTests(value: intList, hasher: &hasher) + deepHashNiTests(value: doubleList, hasher: &hasher) + deepHashNiTests(value: boolList, hasher: &hasher) + deepHashNiTests(value: enumList, hasher: &hasher) + deepHashNiTests(value: objectList, hasher: &hasher) + deepHashNiTests(value: listList, hasher: &hasher) + deepHashNiTests(value: mapList, hasher: &hasher) + deepHashNiTests(value: map, hasher: &hasher) + deepHashNiTests(value: stringMap, hasher: &hasher) + deepHashNiTests(value: intMap, hasher: &hasher) + deepHashNiTests(value: enumMap, hasher: &hasher) + deepHashNiTests(value: objectMap, hasher: &hasher) + deepHashNiTests(value: listMap, hasher: &hasher) + deepHashNiTests(value: mapMap, hasher: &hasher) + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NIAllNullableTypes] class is being used to +/// test Swift classes. +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@available(iOS 13, macOS 10.15, *) +@objc class NIAllNullableTypesWithoutRecursionBridge: NSObject { + @objc init( + aNullableBool: NSNumber? = nil, + aNullableInt: NSNumber? = nil, + aNullableInt64: NSNumber? = nil, + aNullableDouble: NSNumber? = nil, + aNullableByteArray: NiTestsPigeonTypedData? = nil, + aNullable4ByteArray: NiTestsPigeonTypedData? = nil, + aNullable8ByteArray: NiTestsPigeonTypedData? = nil, + aNullableFloatArray: NiTestsPigeonTypedData? = nil, + aNullableEnum: NSNumber? = nil, + anotherNullableEnum: NSNumber? = nil, + aNullableString: NSString? = nil, + aNullableObject: NSObject? = nil, + list: [NSObject]? = nil, + stringList: [NSObject]? = nil, + intList: [NSObject]? = nil, + doubleList: [NSObject]? = nil, + boolList: [NSObject]? = nil, + enumList: [NSObject]? = nil, + objectList: [NSObject]? = nil, + listList: [NSObject]? = nil, + mapList: [NSObject]? = nil, + map: [NSObject: NSObject]? = nil, + stringMap: [NSObject: NSObject]? = nil, + intMap: [NSObject: NSObject]? = nil, + enumMap: [NSObject: NSObject]? = nil, + objectMap: [NSObject: NSObject]? = nil, + listMap: [NSObject: NSObject]? = nil, + mapMap: [NSObject: NSObject]? = nil + ) { + self.aNullableBool = aNullableBool + self.aNullableInt = aNullableInt + self.aNullableInt64 = aNullableInt64 + self.aNullableDouble = aNullableDouble + self.aNullableByteArray = aNullableByteArray + self.aNullable4ByteArray = aNullable4ByteArray + self.aNullable8ByteArray = aNullable8ByteArray + self.aNullableFloatArray = aNullableFloatArray + self.aNullableEnum = aNullableEnum + self.anotherNullableEnum = anotherNullableEnum + self.aNullableString = aNullableString + self.aNullableObject = aNullableObject + self.list = list + self.stringList = stringList + self.intList = intList + self.doubleList = doubleList + self.boolList = boolList + self.enumList = enumList + self.objectList = objectList + self.listList = listList + self.mapList = mapList + self.map = map + self.stringMap = stringMap + self.intMap = intMap + self.enumMap = enumMap + self.objectMap = objectMap + self.listMap = listMap + self.mapMap = mapMap + } + @objc var aNullableBool: NSNumber? = nil + @objc var aNullableInt: NSNumber? = nil + @objc var aNullableInt64: NSNumber? = nil + @objc var aNullableDouble: NSNumber? = nil + @objc var aNullableByteArray: NiTestsPigeonTypedData? = nil + @objc var aNullable4ByteArray: NiTestsPigeonTypedData? = nil + @objc var aNullable8ByteArray: NiTestsPigeonTypedData? = nil + @objc var aNullableFloatArray: NiTestsPigeonTypedData? = nil + @objc var aNullableEnum: NSNumber? = nil + @objc var anotherNullableEnum: NSNumber? = nil + @objc var aNullableString: NSString? = nil + @objc var aNullableObject: NSObject? = nil + @objc var list: [NSObject]? = nil + @objc var stringList: [NSObject]? = nil + @objc var intList: [NSObject]? = nil + @objc var doubleList: [NSObject]? = nil + @objc var boolList: [NSObject]? = nil + @objc var enumList: [NSObject]? = nil + @objc var objectList: [NSObject]? = nil + @objc var listList: [NSObject]? = nil + @objc var mapList: [NSObject]? = nil + @objc var map: [NSObject: NSObject]? = nil + @objc var stringMap: [NSObject: NSObject]? = nil + @objc var intMap: [NSObject: NSObject]? = nil + @objc var enumMap: [NSObject: NSObject]? = nil + @objc var objectMap: [NSObject: NSObject]? = nil + @objc var listMap: [NSObject: NSObject]? = nil + @objc var mapMap: [NSObject: NSObject]? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromSwift(_ pigeonVar_Class: NIAllNullableTypesWithoutRecursion?) + -> NIAllNullableTypesWithoutRecursionBridge? + { + if isNullish(pigeonVar_Class) { + return nil + } + return NIAllNullableTypesWithoutRecursionBridge( + aNullableBool: isNullish(pigeonVar_Class!.aNullableBool) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableBool!), + aNullableInt: isNullish(pigeonVar_Class!.aNullableInt) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt!), + aNullableInt64: isNullish(pigeonVar_Class!.aNullableInt64) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt64!), + aNullableDouble: isNullish(pigeonVar_Class!.aNullableDouble) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableDouble!), + aNullableByteArray: isNullish(pigeonVar_Class!.aNullableByteArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullableByteArray!), + aNullable4ByteArray: isNullish(pigeonVar_Class!.aNullable4ByteArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullable4ByteArray!), + aNullable8ByteArray: isNullish(pigeonVar_Class!.aNullable8ByteArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullable8ByteArray!), + aNullableFloatArray: isNullish(pigeonVar_Class!.aNullableFloatArray) + ? nil : NiTestsPigeonTypedData(pigeonVar_Class!.aNullableFloatArray!), + aNullableEnum: isNullish(pigeonVar_Class!.aNullableEnum) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableEnum!.rawValue), + anotherNullableEnum: isNullish(pigeonVar_Class!.anotherNullableEnum) + ? nil : NSNumber(value: pigeonVar_Class!.anotherNullableEnum!.rawValue), + aNullableString: pigeonVar_Class!.aNullableString as NSString?, + aNullableObject: _PigeonFfiCodec.writeValue( + value: pigeonVar_Class!.aNullableObject, isObject: true) as? NSObject, + list: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.list) as? [NSObject], + stringList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.stringList) as? [NSObject], + intList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.intList) as? [NSObject], + doubleList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.doubleList) as? [NSObject], + boolList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.boolList) as? [NSObject], + enumList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.enumList) as? [NSObject], + objectList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.objectList) as? [NSObject], + listList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.listList) as? [NSObject], + mapList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.mapList) as? [NSObject], + map: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.map) as? [NSObject: NSObject], + stringMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.stringMap) + as? [NSObject: NSObject], + intMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.intMap) as? [NSObject: NSObject], + enumMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.enumMap) as? [NSObject: NSObject], + objectMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.objectMap) + as? [NSObject: NSObject], + listMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.listMap) as? [NSObject: NSObject], + mapMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.mapMap) as? [NSObject: NSObject], + ) + } + func toSwift() -> NIAllNullableTypesWithoutRecursion { + return NIAllNullableTypesWithoutRecursion( + aNullableBool: isNullish(aNullableBool) ? nil : aNullableBool!.boolValue, + aNullableInt: isNullish(aNullableInt) ? nil : aNullableInt!.int64Value, + aNullableInt64: isNullish(aNullableInt64) ? nil : aNullableInt64!.int64Value, + aNullableDouble: isNullish(aNullableDouble) ? nil : aNullableDouble!.doubleValue, + aNullableByteArray: isNullish(aNullableByteArray) ? nil : aNullableByteArray!.toUint8Array(), + aNullable4ByteArray: isNullish(aNullable4ByteArray) + ? nil : aNullable4ByteArray!.toInt32Array(), + aNullable8ByteArray: isNullish(aNullable8ByteArray) + ? nil : aNullable8ByteArray!.toInt64Array(), + aNullableFloatArray: isNullish(aNullableFloatArray) + ? nil : aNullableFloatArray!.toFloat64Array(), + aNullableEnum: isNullish(aNullableEnum) + ? nil : NIAnEnum.init(rawValue: aNullableEnum!.intValue), + anotherNullableEnum: isNullish(anotherNullableEnum) + ? nil : NIAnotherEnum.init(rawValue: anotherNullableEnum!.intValue), + aNullableString: aNullableString as String?, + aNullableObject: _PigeonFfiCodec.readValue(value: aNullableObject), + list: _PigeonFfiCodec.readValue(value: list as NSObject?) as? [Any?], + stringList: _PigeonFfiCodec.readValue(value: stringList as NSObject?, type: "String") + as? [String?], + intList: _PigeonFfiCodec.readValue(value: intList as NSObject?, type: "int") as? [Int64?], + doubleList: _PigeonFfiCodec.readValue(value: doubleList as NSObject?, type: "double") + as? [Double?], + boolList: _PigeonFfiCodec.readValue(value: boolList as NSObject?, type: "bool") as? [Bool?], + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum?], + objectList: _PigeonFfiCodec.readValue(value: objectList as NSObject?, type: "Object") + as? [Any?], + listList: _PigeonFfiCodec.readValue(value: listList as NSObject?) as? [[Any?]?], + mapList: _PigeonFfiCodec.readValue(value: mapList as NSObject?) as? [[AnyHashable?: Any?]?], + map: _PigeonFfiCodec.readValue(value: map as NSObject?) as? [AnyHashable?: Any?], + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String?: String?], + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64?: Int64?], + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum?: NIAnEnum?], + objectMap: _PigeonFfiCodec.readValue( + value: objectMap as NSObject?, type: "Object", type2: "Object") as? [AnyHashable?: Any?], + listMap: _PigeonFfiCodec.readValue(value: listMap as NSObject?, type: "int") + as? [Int64?: [Any?]?], + mapMap: _PigeonFfiCodec.readValue(value: mapMap as NSObject?, type: "int") + as? [Int64?: [AnyHashable?: Any?]?], + ) + } +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `NIAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NIAllTypes` when testing doesn't require both (ie. testing null classes). +/// +/// Generated class from Pigeon that represents data sent in messages. +struct NIAllClassesWrapper: Hashable { + var allNullableTypes: NIAllNullableTypes + var allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursion? = nil + var allTypes: NIAllTypes? = nil + var classList: [NIAllTypes?] + var nullableClassList: [NIAllNullableTypesWithoutRecursion?]? = nil + var classMap: [Int64?: NIAllTypes?] + var nullableClassMap: [Int64?: NIAllNullableTypesWithoutRecursion?]? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NIAllClassesWrapper? { + let allNullableTypes = pigeonVar_list[0] as! NIAllNullableTypes + let allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursion? = nilOrValue( + pigeonVar_list[1]) + let allTypes: NIAllTypes? = nilOrValue(pigeonVar_list[2]) + let classList = pigeonVar_list[3] as! [NIAllTypes?] + let nullableClassList: [NIAllNullableTypesWithoutRecursion?]? = nilOrValue(pigeonVar_list[4]) + let classMap = pigeonVar_list[5] as! [Int64?: NIAllTypes?] + let nullableClassMap: [Int64?: NIAllNullableTypesWithoutRecursion?]? = nilOrValue( + pigeonVar_list[6]) + + return NIAllClassesWrapper( + allNullableTypes: allNullableTypes, + allNullableTypesWithoutRecursion: allNullableTypesWithoutRecursion, + allTypes: allTypes, + classList: classList, + nullableClassList: nullableClassList, + classMap: classMap, + nullableClassMap: nullableClassMap + ) + } + func toList() -> [Any?] { + return [ + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap, + ] + } + static func == (lhs: NIAllClassesWrapper, rhs: NIAllClassesWrapper) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return deepEqualsNiTests(lhs.allNullableTypes, rhs.allNullableTypes) + && deepEqualsNiTests( + lhs.allNullableTypesWithoutRecursion, rhs.allNullableTypesWithoutRecursion) + && deepEqualsNiTests(lhs.allTypes, rhs.allTypes) + && deepEqualsNiTests(lhs.classList, rhs.classList) + && deepEqualsNiTests(lhs.nullableClassList, rhs.nullableClassList) + && deepEqualsNiTests(lhs.classMap, rhs.classMap) + && deepEqualsNiTests(lhs.nullableClassMap, rhs.nullableClassMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NIAllClassesWrapper") + deepHashNiTests(value: allNullableTypes, hasher: &hasher) + deepHashNiTests(value: allNullableTypesWithoutRecursion, hasher: &hasher) + deepHashNiTests(value: allTypes, hasher: &hasher) + deepHashNiTests(value: classList, hasher: &hasher) + deepHashNiTests(value: nullableClassList, hasher: &hasher) + deepHashNiTests(value: classMap, hasher: &hasher) + deepHashNiTests(value: nullableClassMap, hasher: &hasher) + } +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `NIAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NIAllTypes` when testing doesn't require both (ie. testing null classes). +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@available(iOS 13, macOS 10.15, *) +@objc class NIAllClassesWrapperBridge: NSObject { + @objc init( + allNullableTypes: NIAllNullableTypesBridge, + allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursionBridge? = nil, + allTypes: NIAllTypesBridge? = nil, + classList: [NSObject], + nullableClassList: [NSObject]? = nil, + classMap: [NSObject: NSObject], + nullableClassMap: [NSObject: NSObject]? = nil + ) { + self.allNullableTypes = allNullableTypes + self.allNullableTypesWithoutRecursion = allNullableTypesWithoutRecursion + self.allTypes = allTypes + self.classList = classList + self.nullableClassList = nullableClassList + self.classMap = classMap + self.nullableClassMap = nullableClassMap + } + @objc var allNullableTypes: NIAllNullableTypesBridge + @objc var allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursionBridge? = nil + @objc var allTypes: NIAllTypesBridge? = nil + @objc var classList: [NSObject] + @objc var nullableClassList: [NSObject]? = nil + @objc var classMap: [NSObject: NSObject] + @objc var nullableClassMap: [NSObject: NSObject]? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromSwift(_ pigeonVar_Class: NIAllClassesWrapper?) -> NIAllClassesWrapperBridge? { + if isNullish(pigeonVar_Class) { + return nil + } + return NIAllClassesWrapperBridge( + allNullableTypes: NIAllNullableTypesBridge.fromSwift(pigeonVar_Class!.allNullableTypes)!, + allNullableTypesWithoutRecursion: NIAllNullableTypesWithoutRecursionBridge.fromSwift( + pigeonVar_Class!.allNullableTypesWithoutRecursion), + allTypes: NIAllTypesBridge.fromSwift(pigeonVar_Class!.allTypes), + classList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.classList) as! [NSObject], + nullableClassList: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.nullableClassList) + as? [NSObject], + classMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.classMap) + as! [NSObject: NSObject], + nullableClassMap: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.nullableClassMap) + as? [NSObject: NSObject], + ) + } + func toSwift() -> NIAllClassesWrapper { + return NIAllClassesWrapper( + allNullableTypes: allNullableTypes.toSwift(), + allNullableTypesWithoutRecursion: isNullish(allNullableTypesWithoutRecursion) + ? nil : allNullableTypesWithoutRecursion!.toSwift(), + allTypes: isNullish(allTypes) ? nil : allTypes!.toSwift(), + classList: _PigeonFfiCodec.readValue(value: classList as NSObject, type: "NIAllTypes") + as! [NIAllTypes?], + nullableClassList: _PigeonFfiCodec.readValue( + value: nullableClassList as NSObject?, type: "NIAllNullableTypesWithoutRecursion") + as? [NIAllNullableTypesWithoutRecursion?], + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllTypes") as! [Int64?: NIAllTypes?], + nullableClassMap: _PigeonFfiCodec.readValue( + value: nullableClassMap as NSObject?, type: "int", + type2: "NIAllNullableTypesWithoutRecursion") + as? [Int64?: NIAllNullableTypesWithoutRecursion?], + ) + } +} + +@objc class NiTestsPigeonInternalNull: NSObject {} + +@available(iOS 13, macOS 10.15, *) +class _PigeonFfiCodec { + static func readValue(value: NSObject?, type: String? = nil, type2: String? = nil) -> Any? { + if isNullish(value) { + return nil + } + if let typedData = value as? NiTestsPigeonTypedData { + switch typedData.type { + case NiTestsMyDataType.uint8.rawValue: + return typedData.toUint8Array() + case NiTestsMyDataType.int32.rawValue: + return typedData.toInt32Array() + case NiTestsMyDataType.int64.rawValue: + return typedData.toInt64Array() + case NiTestsMyDataType.float32.rawValue: + return typedData.toFloat32Array() + case NiTestsMyDataType.float64.rawValue: + return typedData.toFloat64Array() + default: + return typedData + } + } + if value is NSNumber { + let number = value as! NSNumber + if type == "int" || type == "int64" { + return number.int64Value + } else if type == "double" { + return number.doubleValue + } else if type == "bool" { + return number.boolValue + } else if type == "NIAnEnum" { + return NIAnEnum.init(rawValue: number.intValue) + } else if type == "NIAnotherEnum" { + return NIAnotherEnum.init(rawValue: number.intValue) + } + + return number.int64Value + } + if value is NSMutableArray || value is NSArray { + var res: [Any?] = [] + for item in (value as! NSArray) { + res.append(readValue(value: item as? NSObject, type: type)) + } + return res + } + if value is NSDictionary { + var res: [AnyHashable?: Any?] = Dictionary() + for (key, value) in (value as! NSDictionary) { + res[readValue(value: key as? NSObject, type: type) as? AnyHashable] = readValue( + value: value as? NSObject, type: type2) + } + return res + } + if value is NiTestsNumberWrapper { + return unwrapNumber(wrappedNumber: value as! NiTestsNumberWrapper) + } + if value is NSString { + return value as! NSString + } else if value is NIUnusedClassBridge { + return (value! as! NIUnusedClassBridge).toSwift() + } else if value is NIAllTypesBridge { + return (value! as! NIAllTypesBridge).toSwift() + } else if value is NIAllNullableTypesBridge { + return (value! as! NIAllNullableTypesBridge).toSwift() + } else if value is NIAllNullableTypesWithoutRecursionBridge { + return (value! as! NIAllNullableTypesWithoutRecursionBridge).toSwift() + } else if value is NIAllClassesWrapperBridge { + return (value! as! NIAllClassesWrapperBridge).toSwift() + + } + return value + } + + static func writeValue(value: Any?, isObject: Bool = false) -> Any? { + if isNullish(value) { + return NiTestsPigeonInternalNull() + } + if let uint8Array = value as? [UInt8] { + return isObject ? NiTestsPigeonTypedData(uint8Array) : uint8Array as NSArray + } + if let int32Array = value as? [Int32] { + return isObject ? NiTestsPigeonTypedData(int32Array) : int32Array as NSArray + } + if let int64Array = value as? [Int64] { + return isObject ? NiTestsPigeonTypedData(int64Array) : int64Array as NSArray + } + if let float32Array = value as? [Float32] { + return isObject ? NiTestsPigeonTypedData(float32Array) : float32Array as NSArray + } + if let float64Array = value as? [Double] { + return isObject ? NiTestsPigeonTypedData(float64Array) : float64Array as NSArray + } + if value is Bool || value is Double || value is Int || value is Int64 || value is NIAnEnum + || value is NIAnotherEnum + { + if isObject { + return wrapNumber(number: value!) + } + if value is Bool { + return value + } else if value is Double { + return value + } else if value is Int || value is Int64 { + return value + } else if value is NIAnEnum { + return (value as! NIAnEnum).rawValue + } else if value is NIAnotherEnum { + return (value as! NIAnotherEnum).rawValue + } + } + if value is [Any] { + let res: NSMutableArray = NSMutableArray() + for item in (value as! [Any]) { + res.add( + isNullish(item) + ? NiTestsPigeonInternalNull() : writeValue(value: item, isObject: true) as! NSObject) + } + return res + } + if value is [AnyHashable: Any] { + let res: NSMutableDictionary = NSMutableDictionary() + for (key, value) in (value as! [AnyHashable: Any]) { + res.setObject( + isNullish(key) + ? NiTestsPigeonInternalNull() : writeValue(value: value, isObject: true) as! NSObject, + forKey: writeValue(value: key, isObject: true) as! NSCopying) + } + return res + } + if value is String { + return value as! NSString + } else if value is NIUnusedClass { + return NIUnusedClassBridge.fromSwift(value as? NIUnusedClass) + } else if value is NIAllTypes { + return NIAllTypesBridge.fromSwift(value as? NIAllTypes) + } else if value is NIAllNullableTypes { + return NIAllNullableTypesBridge.fromSwift(value as? NIAllNullableTypes) + } else if value is NIAllNullableTypesWithoutRecursion { + return NIAllNullableTypesWithoutRecursionBridge.fromSwift( + value as? NIAllNullableTypesWithoutRecursion) + } else if value is NIAllClassesWrapper { + return NIAllClassesWrapperBridge.fromSwift(value as? NIAllClassesWrapper) + + } + return value + } +} + +let defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" +@available(iOS 13, macOS 10.15, *) +class NIHostIntegrationCoreApiInstanceTracker { + static var instancesOfNIHostIntegrationCoreApi = [String: NIHostIntegrationCoreApiSetup?]() +} + +/// The core interface that each host language plugin must implement in +/// platform_test integration tests. +/// +/// Generated protocol from Pigeon that represents a handler of messages from Flutter. +@available(iOS 13, macOS 10.15, *) +protocol NIHostIntegrationCoreApi { + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + func noop() throws + /// Returns the passed object, to test serialization and deserialization. + func echo(_ everything: NIAllTypes) throws -> NIAllTypes + /// Returns an error, to test error handling. + func throwError() throws -> Any? + /// Returns an error from a void function, to test error handling. + func throwErrorFromVoid() throws + /// Returns a Flutter error, to test error handling. + func throwFlutterError() throws -> Any? + /// Returns passed in int. + func echo(_ anInt: Int64) throws -> Int64 + /// Returns passed in double. + func echo(_ aDouble: Double) throws -> Double + /// Returns the passed in boolean. + func echo(_ aBool: Bool) throws -> Bool + /// Returns the passed in string. + func echo(_ aString: String) throws -> String + /// Returns the passed in Uint8List. + func echo(_ aUint8List: [UInt8]) throws -> [UInt8] + /// Returns the passed in Int32List. + func echo(_ aInt32List: [Int32]) throws -> [Int32] + /// Returns the passed in Int64List. + func echo(_ aInt64List: [Int64]) throws -> [Int64] + /// Returns the passed in Float64List. + func echo(_ aFloat64List: [Float64]) throws -> [Float64] + /// Returns the passed in generic Object. + func echo(_ anObject: Any) throws -> Any + /// Returns the passed list, to test serialization and deserialization. + func echo(_ list: [Any?]) throws -> [Any?] + /// Returns the passed list, to test serialization and deserialization. + func echo(stringList: [String?]) throws -> [String?] + /// Returns the passed list, to test serialization and deserialization. + func echo(intList: [Int64?]) throws -> [Int64?] + /// Returns the passed list, to test serialization and deserialization. + func echo(doubleList: [Double?]) throws -> [Double?] + /// Returns the passed list, to test serialization and deserialization. + func echo(boolList: [Bool?]) throws -> [Bool?] + /// Returns the passed list, to test serialization and deserialization. + func echo(enumList: [NIAnEnum?]) throws -> [NIAnEnum?] + /// Returns the passed list, to test serialization and deserialization. + func echo(classList: [NIAllNullableTypes?]) throws -> [NIAllNullableTypes?] + /// Returns the passed list, to test serialization and deserialization. + func echoNonNull(enumList: [NIAnEnum]) throws -> [NIAnEnum] + /// Returns the passed list, to test serialization and deserialization. + func echoNonNull(classList: [NIAllNullableTypes]) throws -> [NIAllNullableTypes] + /// Returns the passed map, to test serialization and deserialization. + func echo(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] + /// Returns the passed map, to test serialization and deserialization. + func echo(stringMap: [String?: String?]) throws -> [String?: String?] + /// Returns the passed map, to test serialization and deserialization. + func echo(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] + /// Returns the passed map, to test serialization and deserialization. + func echo(enumMap: [NIAnEnum?: NIAnEnum?]) throws -> [NIAnEnum?: NIAnEnum?] + /// Returns the passed map, to test serialization and deserialization. + func echo(classMap: [Int64?: NIAllNullableTypes?]) throws -> [Int64?: NIAllNullableTypes?] + /// Returns the passed map, to test serialization and deserialization. + func echoNonNull(stringMap: [String: String]) throws -> [String: String] + /// Returns the passed map, to test serialization and deserialization. + func echoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] + /// Returns the passed map, to test serialization and deserialization. + func echoNonNull(enumMap: [NIAnEnum: NIAnEnum]) throws -> [NIAnEnum: NIAnEnum] + /// Returns the passed map, to test serialization and deserialization. + func echoNonNull(classMap: [Int64: NIAllNullableTypes]) throws -> [Int64: NIAllNullableTypes] + /// Returns the passed class to test nested class serialization and deserialization. + func echo(_ wrapper: NIAllClassesWrapper) throws -> NIAllClassesWrapper + /// Returns the passed enum to test serialization and deserialization. + func echo(_ anEnum: NIAnEnum) throws -> NIAnEnum + /// Returns the passed enum to test serialization and deserialization. + func echo(_ anotherEnum: NIAnotherEnum) throws -> NIAnotherEnum + /// Returns the default string. + func echoNamedDefault(_ aString: String) throws -> String + /// Returns passed in double. + func echoOptionalDefault(_ aDouble: Double) throws -> Double + /// Returns passed in int. + func echoRequired(_ anInt: Int64) throws -> Int64 + /// Returns the passed object, to test serialization and deserialization. + func echoNullable(_ everything: NIAllNullableTypes?) throws -> NIAllNullableTypes? + /// Returns the passed object, to test serialization and deserialization. + func echoNullable(_ everything: NIAllNullableTypesWithoutRecursion?) throws + -> NIAllNullableTypesWithoutRecursion? + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + func extractNestedNullableString(from wrapper: NIAllClassesWrapper) throws -> String? + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + func createNestedObject(with nullableString: String?) throws -> NIAllClassesWrapper + func sendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypes + func sendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypesWithoutRecursion + /// Returns passed in int. + func echoNullable(_ aNullableInt: Int64?) throws -> Int64? + /// Returns passed in double. + func echoNullable(_ aNullableDouble: Double?) throws -> Double? + /// Returns the passed in boolean. + func echoNullable(_ aNullableBool: Bool?) throws -> Bool? + /// Returns the passed in string. + func echoNullable(_ aNullableString: String?) throws -> String? + /// Returns the passed in Uint8List. + func echoNullable(_ aNullableUint8List: [UInt8]?) throws -> [UInt8]? + /// Returns the passed in Int32List. + func echoNullable(_ aNullableInt32List: [Int32]?) throws -> [Int32]? + /// Returns the passed in Int64List. + func echoNullable(_ aNullableInt64List: [Int64]?) throws -> [Int64]? + /// Returns the passed in Float64List. + func echoNullable(_ aNullableFloat64List: [Float64]?) throws -> [Float64]? + /// Returns the passed in generic Object. + func echoNullable(_ aNullableObject: Any?) throws -> Any? + /// Returns the passed list, to test serialization and deserialization. + func echoNullable(_ aNullableList: [Any?]?) throws -> [Any?]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullable(enumList: [NIAnEnum?]?) throws -> [NIAnEnum?]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullable(classList: [NIAllNullableTypes?]?) throws -> [NIAllNullableTypes?]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNull(enumList: [NIAnEnum]?) throws -> [NIAnEnum]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNull(classList: [NIAllNullableTypes]?) throws -> [NIAllNullableTypes]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullable(_ map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullable(stringMap: [String?: String?]?) throws -> [String?: String?]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullable(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullable(enumMap: [NIAnEnum?: NIAnEnum?]?) throws -> [NIAnEnum?: NIAnEnum?]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullable(classMap: [Int64?: NIAllNullableTypes?]?) throws -> [Int64?: + NIAllNullableTypes?]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNull(stringMap: [String: String]?) throws -> [String: String]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNull(enumMap: [NIAnEnum: NIAnEnum]?) throws -> [NIAnEnum: NIAnEnum]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNull(classMap: [Int64: NIAllNullableTypes]?) throws -> [Int64: + NIAllNullableTypes]? + func echoNullable(_ anEnum: NIAnEnum?) throws -> NIAnEnum? + func echoNullable(_ anotherEnum: NIAnotherEnum?) throws -> NIAnotherEnum? + /// Returns passed in int. + func echoOptional(_ aNullableInt: Int64?) throws -> Int64? + /// Returns the passed in string. + func echoNamed(_ aNullableString: String?) throws -> String? + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + func noopAsync() async throws + /// Returns passed in int asynchronously. + func echoAsync(_ anInt: Int64) async throws -> Int64 + /// Returns passed in double asynchronously. + func echoAsync(_ aDouble: Double) async throws -> Double + /// Returns the passed in boolean asynchronously. + func echoAsync(_ aBool: Bool) async throws -> Bool + /// Returns the passed string asynchronously. + func echoAsync(_ aString: String) async throws -> String + /// Returns the passed in Uint8List asynchronously. + func echoAsync(_ aUint8List: [UInt8]) async throws -> [UInt8] + /// Returns the passed in Int32List asynchronously. + func echoAsync(_ aInt32List: [Int32]) async throws -> [Int32] + /// Returns the passed in Int64List asynchronously. + func echoAsync(_ aInt64List: [Int64]) async throws -> [Int64] + /// Returns the passed in Float64List asynchronously. + func echoAsync(_ aFloat64List: [Float64]) async throws -> [Float64] + /// Returns the passed in generic Object asynchronously. + func echoAsync(_ anObject: Any) async throws -> Any + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsync(_ list: [Any?]) async throws -> [Any?] + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsync(enumList: [NIAnEnum?]) async throws -> [NIAnEnum?] + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsync(classList: [NIAllNullableTypes?]) async throws -> [NIAllNullableTypes?] + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsync(_ map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsync(stringMap: [String?: String?]) async throws -> [String?: String?] + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsync(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsync(enumMap: [NIAnEnum?: NIAnEnum?]) async throws -> [NIAnEnum?: NIAnEnum?] + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsync(classMap: [Int64?: NIAllNullableTypes?]) async throws -> [Int64?: + NIAllNullableTypes?] + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsync(_ anEnum: NIAnEnum) async throws -> NIAnEnum + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsync(_ anotherEnum: NIAnotherEnum) async throws -> NIAnotherEnum + /// Responds with an error from an async function returning a value. + func throwAsyncError() async throws -> Any? + /// Responds with an error from an async void function. + func throwAsyncErrorFromVoid() async throws + /// Responds with a Flutter error from an async function returning a value. + func throwAsyncFlutterError() async throws -> Any? + /// Returns the passed object, to test async serialization and deserialization. + func echoAsync(_ everything: NIAllTypes) async throws -> NIAllTypes + /// Returns the passed object, to test serialization and deserialization. + func echoAsync(_ everything: NIAllNullableTypes?) async throws -> NIAllNullableTypes? + /// Returns the passed object, to test serialization and deserialization. + func echoAsync(_ everything: NIAllNullableTypesWithoutRecursion?) async throws + -> NIAllNullableTypesWithoutRecursion? + /// Returns passed in int asynchronously. + func echoAsyncNullable(_ anInt: Int64?) async throws -> Int64? + /// Returns passed in double asynchronously. + func echoAsyncNullable(_ aDouble: Double?) async throws -> Double? + /// Returns the passed in boolean asynchronously. + func echoAsyncNullable(_ aBool: Bool?) async throws -> Bool? + /// Returns the passed string asynchronously. + func echoAsyncNullable(_ aString: String?) async throws -> String? + /// Returns the passed in Uint8List asynchronously. + func echoAsyncNullable(_ aUint8List: [UInt8]?) async throws -> [UInt8]? + /// Returns the passed in Int32List asynchronously. + func echoAsyncNullable(_ aInt32List: [Int32]?) async throws -> [Int32]? + /// Returns the passed in Int64List asynchronously. + func echoAsyncNullable(_ aInt64List: [Int64]?) async throws -> [Int64]? + /// Returns the passed in Float64List asynchronously. + func echoAsyncNullable(_ aFloat64List: [Float64]?) async throws -> [Float64]? + /// Returns the passed in generic Object asynchronously. + func echoAsyncNullable(_ anObject: Any?) async throws -> Any? + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsyncNullable(_ list: [Any?]?) async throws -> [Any?]? + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsyncNullable(enumList: [NIAnEnum?]?) async throws -> [NIAnEnum?]? + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsyncNullable(classList: [NIAllNullableTypes?]?) async throws -> [NIAllNullableTypes?]? + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsyncNullable(_ map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: Any?]? + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsyncNullable(stringMap: [String?: String?]?) async throws -> [String?: String?]? + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsyncNullable(intMap: [Int64?: Int64?]?) async throws -> [Int64?: Int64?]? + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsyncNullable(enumMap: [NIAnEnum?: NIAnEnum?]?) async throws -> [NIAnEnum?: NIAnEnum?]? + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsyncNullable(classMap: [Int64?: NIAllNullableTypes?]?) async throws -> [Int64?: + NIAllNullableTypes?]? + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsyncNullable(_ anEnum: NIAnEnum?) async throws -> NIAnEnum? + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsyncNullable(_ anotherEnum: NIAnotherEnum?) async throws -> NIAnotherEnum? + func callFlutterNoop() throws + func callFlutterThrowError() throws -> Any? + func callFlutterThrowErrorFromVoid() throws + func callFlutterEcho(_ everything: NIAllTypes) throws -> NIAllTypes + func callFlutterEcho(_ everything: NIAllNullableTypes?) throws -> NIAllNullableTypes? + func callFlutterSendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypes + func callFlutterEcho(_ everything: NIAllNullableTypesWithoutRecursion?) throws + -> NIAllNullableTypesWithoutRecursion? + func callFlutterSendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypesWithoutRecursion + func callFlutterEcho(_ aBool: Bool) throws -> Bool + func callFlutterEcho(_ anInt: Int64) throws -> Int64 + func callFlutterEcho(_ aDouble: Double) throws -> Double + func callFlutterEcho(_ aString: String) throws -> String + func callFlutterEcho(_ list: [UInt8]) throws -> [UInt8] + func callFlutterEcho(_ list: [Int32]) throws -> [Int32] + func callFlutterEcho(_ list: [Int64]) throws -> [Int64] + func callFlutterEcho(_ list: [Float64]) throws -> [Float64] + func callFlutterEcho(_ list: [Any?]) throws -> [Any?] + func callFlutterEcho(enumList: [NIAnEnum?]) throws -> [NIAnEnum?] + func callFlutterEcho(classList: [NIAllNullableTypes?]) throws -> [NIAllNullableTypes?] + func callFlutterEchoNonNull(enumList: [NIAnEnum]) throws -> [NIAnEnum] + func callFlutterEchoNonNull(classList: [NIAllNullableTypes]) throws -> [NIAllNullableTypes] + func callFlutterEcho(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] + func callFlutterEcho(stringMap: [String?: String?]) throws -> [String?: String?] + func callFlutterEcho(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] + func callFlutterEcho(enumMap: [NIAnEnum?: NIAnEnum?]) throws -> [NIAnEnum?: NIAnEnum?] + func callFlutterEcho(classMap: [Int64?: NIAllNullableTypes?]) throws -> [Int64?: + NIAllNullableTypes?] + func callFlutterEchoNonNull(stringMap: [String: String]) throws -> [String: String] + func callFlutterEchoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] + func callFlutterEchoNonNull(enumMap: [NIAnEnum: NIAnEnum]) throws -> [NIAnEnum: NIAnEnum] + func callFlutterEchoNonNull(classMap: [Int64: NIAllNullableTypes]) throws -> [Int64: + NIAllNullableTypes] + func callFlutterEcho(_ anEnum: NIAnEnum) throws -> NIAnEnum + func callFlutterEcho(_ anotherEnum: NIAnotherEnum) throws -> NIAnotherEnum + func callFlutterEchoNullable(_ aBool: Bool?) throws -> Bool? + func callFlutterEchoNullable(_ anInt: Int64?) throws -> Int64? + func callFlutterEchoNullable(_ aDouble: Double?) throws -> Double? + func callFlutterEchoNullable(_ aString: String?) throws -> String? + func callFlutterEchoNullable(_ list: [UInt8]?) throws -> [UInt8]? + func callFlutterEchoNullable(_ list: [Int32]?) throws -> [Int32]? + func callFlutterEchoNullable(_ list: [Int64]?) throws -> [Int64]? + func callFlutterEchoNullable(_ list: [Float64]?) throws -> [Float64]? + func callFlutterEchoNullable(_ list: [Any?]?) throws -> [Any?]? + func callFlutterEchoNullable(enumList: [NIAnEnum?]?) throws -> [NIAnEnum?]? + func callFlutterEchoNullable(classList: [NIAllNullableTypes?]?) throws -> [NIAllNullableTypes?]? + func callFlutterEchoNullableNonNull(enumList: [NIAnEnum]?) throws -> [NIAnEnum]? + func callFlutterEchoNullableNonNull(classList: [NIAllNullableTypes]?) throws + -> [NIAllNullableTypes]? + func callFlutterEchoNullable(_ map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? + func callFlutterEchoNullable(stringMap: [String?: String?]?) throws -> [String?: String?]? + func callFlutterEchoNullable(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? + func callFlutterEchoNullable(enumMap: [NIAnEnum?: NIAnEnum?]?) throws -> [NIAnEnum?: NIAnEnum?]? + func callFlutterEchoNullable(classMap: [Int64?: NIAllNullableTypes?]?) throws -> [Int64?: + NIAllNullableTypes?]? + func callFlutterEchoNullableNonNull(stringMap: [String: String]?) throws -> [String: String]? + func callFlutterEchoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? + func callFlutterEchoNullableNonNull(enumMap: [NIAnEnum: NIAnEnum]?) throws -> [NIAnEnum: + NIAnEnum]? + func callFlutterEchoNullableNonNull(classMap: [Int64: NIAllNullableTypes]?) throws -> [Int64: + NIAllNullableTypes]? + func callFlutterEchoNullable(_ anEnum: NIAnEnum?) throws -> NIAnEnum? + func callFlutterEchoNullable(_ anotherEnum: NIAnotherEnum?) throws -> NIAnotherEnum? + func callFlutterNoopAsync() async throws + func callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes) async throws -> NIAllTypes + func callFlutterEchoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?) async throws + -> NIAllNullableTypes? + func callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ) async throws -> NIAllNullableTypesWithoutRecursion? + func callFlutterEchoAsyncBool(aBool: Bool) async throws -> Bool + func callFlutterEchoAsyncInt(anInt: Int64) async throws -> Int64 + func callFlutterEchoAsyncDouble(aDouble: Double) async throws -> Double + func callFlutterEchoAsyncString(aString: String) async throws -> String + func callFlutterEchoAsyncUint8List(list: [UInt8]) async throws -> [UInt8] + func callFlutterEchoAsyncInt32List(list: [Int32]) async throws -> [Int32] + func callFlutterEchoAsyncInt64List(list: [Int64]) async throws -> [Int64] + func callFlutterEchoAsyncFloat64List(list: [Float64]) async throws -> [Float64] + func callFlutterEchoAsyncObject(anObject: Any) async throws -> Any + func callFlutterEchoAsyncList(list: [Any?]) async throws -> [Any?] + func callFlutterEchoAsyncEnumList(enumList: [NIAnEnum?]) async throws -> [NIAnEnum?] + func callFlutterEchoAsyncClassList(classList: [NIAllNullableTypes?]) async throws + -> [NIAllNullableTypes?] + func callFlutterEchoAsyncNonNullEnumList(enumList: [NIAnEnum]) async throws -> [NIAnEnum] + func callFlutterEchoAsyncNonNullClassList(classList: [NIAllNullableTypes]) async throws + -> [NIAllNullableTypes] + func callFlutterEchoAsyncMap(map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] + func callFlutterEchoAsyncStringMap(stringMap: [String?: String?]) async throws -> [String?: + String?] + func callFlutterEchoAsyncIntMap(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] + func callFlutterEchoAsyncEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]) async throws -> [NIAnEnum?: + NIAnEnum?] + func callFlutterEchoAsyncClassMap(classMap: [Int64?: NIAllNullableTypes?]) async throws + -> [Int64?: NIAllNullableTypes?] + func callFlutterEchoAsyncEnum(anEnum: NIAnEnum) async throws -> NIAnEnum + func callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum) async throws -> NIAnotherEnum + func callFlutterEchoAsyncNullableBool(aBool: Bool?) async throws -> Bool? + func callFlutterEchoAsyncNullableInt(anInt: Int64?) async throws -> Int64? + func callFlutterEchoAsyncNullableDouble(aDouble: Double?) async throws -> Double? + func callFlutterEchoAsyncNullableString(aString: String?) async throws -> String? + func callFlutterEchoAsyncNullableUint8List(list: [UInt8]?) async throws -> [UInt8]? + func callFlutterEchoAsyncNullableInt32List(list: [Int32]?) async throws -> [Int32]? + func callFlutterEchoAsyncNullableInt64List(list: [Int64]?) async throws -> [Int64]? + func callFlutterEchoAsyncNullableFloat64List(list: [Float64]?) async throws -> [Float64]? + func callFlutterThrowFlutterErrorAsync() async throws -> Any? + func callFlutterEchoAsyncNullableObject(anObject: Any?) async throws -> Any? + func callFlutterEchoAsyncNullableList(list: [Any?]?) async throws -> [Any?]? + func callFlutterEchoAsyncNullableEnumList(enumList: [NIAnEnum?]?) async throws -> [NIAnEnum?]? + func callFlutterEchoAsyncNullableClassList(classList: [NIAllNullableTypes?]?) async throws + -> [NIAllNullableTypes?]? + func callFlutterEchoAsyncNullableNonNullEnumList(enumList: [NIAnEnum]?) async throws + -> [NIAnEnum]? + func callFlutterEchoAsyncNullableNonNullClassList(classList: [NIAllNullableTypes]?) async throws + -> [NIAllNullableTypes]? + func callFlutterEchoAsyncNullableMap(map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: + Any?]? + func callFlutterEchoAsyncNullableStringMap(stringMap: [String?: String?]?) async throws + -> [String?: String?]? + func callFlutterEchoAsyncNullableIntMap(intMap: [Int64?: Int64?]?) async throws -> [Int64?: + Int64?]? + func callFlutterEchoAsyncNullableEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]?) async throws + -> [NIAnEnum?: NIAnEnum?]? + func callFlutterEchoAsyncNullableClassMap(classMap: [Int64?: NIAllNullableTypes?]?) async throws + -> [Int64?: NIAllNullableTypes?]? + func callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?) async throws -> NIAnEnum? + func callFlutterEchoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?) async throws + -> NIAnotherEnum? + /// Returns true if the handler is run on a main thread. + func defaultIsMainThread() throws -> Bool + /// Spawns a background thread and calls `noop` on the [NIFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + func callFlutterNoopOnBackgroundThread() async throws -> Bool +} + +/// Generated setup class from Pigeon to register implemented NIHostIntegrationCoreApi classes. +@available(iOS 13, macOS 10.15, *) +@objc class NIHostIntegrationCoreApiSetup: NSObject { + private var api: NIHostIntegrationCoreApi? + override init() {} + static func register(api: NIHostIntegrationCoreApi?, name: String = defaultInstanceName) { + let wrapper = NIHostIntegrationCoreApiSetup() + wrapper.api = api + NIHostIntegrationCoreApiInstanceTracker.instancesOfNIHostIntegrationCoreApi[name] = wrapper + } + @objc static func getInstance(name: String) -> NIHostIntegrationCoreApiSetup? { + return NIHostIntegrationCoreApiInstanceTracker.instancesOfNIHostIntegrationCoreApi[name] ?? nil + } + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + @objc func noop(wrappedError: NiTestsError) { + do { + return try api!.noop() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + /// Returns the passed object, to test serialization and deserialization. + @objc func echoAllTypes(everything: NIAllTypesBridge, wrappedError: NiTestsError) + -> NIAllTypesBridge? + { + do { + return try NIAllTypesBridge.fromSwift(api!.echo(everything.toSwift()))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns an error, to test error handling. + @objc func throwError(wrappedError: NiTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue(value: api!.throwError(), isObject: true) as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns an error from a void function, to test error handling. + @objc func throwErrorFromVoid(wrappedError: NiTestsError) { + do { + return try api!.throwErrorFromVoid() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + /// Returns a Flutter error, to test error handling. + @objc func throwFlutterError(wrappedError: NiTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue(value: api!.throwFlutterError(), isObject: true) + as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in int. + @objc func echoInt(anInt: Int64, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(anInt)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in double. + @objc func echoDouble(aDouble: Double, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(aDouble)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in boolean. + @objc func echoBool(aBool: Bool, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(aBool)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in string. + @objc func echoString(aString: NSString, wrappedError: NiTestsError) -> NSString? { + do { + return try api!.echo(aString as String) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Uint8List. + @objc func echoUint8List(aUint8List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.echo(aUint8List.toUint8Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int32List. + @objc func echoInt32List(aInt32List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.echo(aInt32List.toInt32Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int64List. + @objc func echoInt64List(aInt64List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.echo(aInt64List.toInt64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Float64List. + @objc func echoFloat64List(aFloat64List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.echo(aFloat64List.toFloat64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in generic Object. + @objc func echoObject(anObject: NSObject, wrappedError: NiTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo(_PigeonFfiCodec.readValue(value: anObject)!), isObject: true) as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoList(list: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + _PigeonFfiCodec.readValue(value: list as NSObject, type: "Object") as! [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoStringList(stringList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + stringList: _PigeonFfiCodec.readValue(value: stringList as NSObject, type: "String") + as! [String?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoIntList(intList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + intList: _PigeonFfiCodec.readValue(value: intList as NSObject, type: "int") as! [Int64?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoDoubleList(doubleList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + doubleList: _PigeonFfiCodec.readValue(value: doubleList as NSObject, type: "double") + as! [Double?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoBoolList(boolList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + boolList: _PigeonFfiCodec.readValue(value: boolList as NSObject, type: "bool") as! [Bool?] + )) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoEnumList(enumList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoClassList(classList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNonNullEnumList(enumList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNonNullClassList(classList: [NSObject], wrappedError: NiTestsError) -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoMap(map: [NSObject: NSObject], wrappedError: NiTestsError) -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + _PigeonFfiCodec.readValue(value: map as NSObject, type: "Object", type2: "Object") + as! [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoStringMap(stringMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoIntMap(intMap: [NSObject: NSObject], wrappedError: NiTestsError) -> [NSObject: + NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoEnumMap(enumMap: [NSObject: NSObject], wrappedError: NiTestsError) -> [NSObject: + NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") + as! [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoClassMap(classMap: [NSObject: NSObject], wrappedError: NiTestsError) -> [NSObject: + NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllNullableTypes") + as! [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullStringMap(stringMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String: String])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullIntMap(intMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64: Int64])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullEnumMap(enumMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") + as! [NIAnEnum: NIAnEnum])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullClassMap(classMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllNullableTypes") + as! [Int64: NIAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed class to test nested class serialization and deserialization. + @objc func echoClassWrapper(wrapper: NIAllClassesWrapperBridge, wrappedError: NiTestsError) + -> NIAllClassesWrapperBridge? + { + do { + return try NIAllClassesWrapperBridge.fromSwift(api!.echo(wrapper.toSwift()))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed enum to test serialization and deserialization. + @objc func echoEnum(anEnum: NIAnEnum, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(anEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed enum to test serialization and deserialization. + @objc func echoAnotherEnum(anotherEnum: NIAnotherEnum, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(anotherEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the default string. + @objc func echoNamedDefaultString(aString: NSString, wrappedError: NiTestsError) -> NSString? { + do { + return try api!.echoNamedDefault(aString as String) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in double. + @objc func echoOptionalDefaultDouble(aDouble: Double, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echoOptionalDefault(aDouble)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in int. + @objc func echoRequiredInt(anInt: Int64, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echoRequired(anInt)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed object, to test serialization and deserialization. + @objc func echoAllNullableTypes(everything: NIAllNullableTypesBridge?, wrappedError: NiTestsError) + -> NIAllNullableTypesBridge? + { + do { + return try NIAllNullableTypesBridge.fromSwift( + api!.echoNullable(isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed object, to test serialization and deserialization. + @objc func echoAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge?, wrappedError: NiTestsError + ) -> NIAllNullableTypesWithoutRecursionBridge? { + do { + return try NIAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.echoNullable(isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @objc func extractNestedNullableString( + wrapper: NIAllClassesWrapperBridge, wrappedError: NiTestsError + ) -> NSString? { + do { + return try api!.extractNestedNullableString(from: wrapper.toSwift()) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @objc func createNestedNullableString(nullableString: NSString?, wrappedError: NiTestsError) + -> NIAllClassesWrapperBridge? + { + do { + return try NIAllClassesWrapperBridge.fromSwift( + api!.createNestedObject(with: nullableString as String?))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func sendMultipleNullableTypes( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + wrappedError: NiTestsError + ) -> NIAllNullableTypesBridge? { + do { + return try NIAllNullableTypesBridge.fromSwift( + api!.sendMultipleNullableTypes( + aBool: isNullish(aNullableBool) ? nil : aNullableBool!.boolValue, + anInt: isNullish(aNullableInt) ? nil : aNullableInt!.int64Value, + aString: aNullableString as String?))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func sendMultipleNullableTypesWithoutRecursion( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + wrappedError: NiTestsError + ) -> NIAllNullableTypesWithoutRecursionBridge? { + do { + return try NIAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.sendMultipleNullableTypesWithoutRecursion( + aBool: isNullish(aNullableBool) ? nil : aNullableBool!.boolValue, + anInt: isNullish(aNullableInt) ? nil : aNullableInt!.int64Value, + aString: aNullableString as String?))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in int. + @objc func echoNullableInt(aNullableInt: NSNumber?, wrappedError: NiTestsError) -> NSNumber? { + do { + return try isNullish( + api!.echoNullable(isNullish(aNullableInt) ? nil : aNullableInt!.int64Value)) + ? nil + : NSNumber( + value: api!.echoNullable(isNullish(aNullableInt) ? nil : aNullableInt!.int64Value)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in double. + @objc func echoNullableDouble(aNullableDouble: NSNumber?, wrappedError: NiTestsError) -> NSNumber? + { + do { + return try isNullish( + api!.echoNullable(isNullish(aNullableDouble) ? nil : aNullableDouble!.doubleValue)) + ? nil + : NSNumber( + value: api!.echoNullable(isNullish(aNullableDouble) ? nil : aNullableDouble!.doubleValue)! + ) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in boolean. + @objc func echoNullableBool(aNullableBool: NSNumber?, wrappedError: NiTestsError) -> NSNumber? { + do { + return try isNullish( + api!.echoNullable(isNullish(aNullableBool) ? nil : aNullableBool!.boolValue)) + ? nil + : NSNumber( + value: api!.echoNullable(isNullish(aNullableBool) ? nil : aNullableBool!.boolValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in string. + @objc func echoNullableString(aNullableString: NSString?, wrappedError: NiTestsError) -> NSString? + { + do { + return try api!.echoNullable(aNullableString as String?) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Uint8List. + @objc func echoNullableUint8List( + aNullableUint8List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + isNullish(aNullableUint8List) ? nil : aNullableUint8List!.toUint8Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int32List. + @objc func echoNullableInt32List( + aNullableInt32List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + isNullish(aNullableInt32List) ? nil : aNullableInt32List!.toInt32Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int64List. + @objc func echoNullableInt64List( + aNullableInt64List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + isNullish(aNullableInt64List) ? nil : aNullableInt64List!.toInt64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Float64List. + @objc func echoNullableFloat64List( + aNullableFloat64List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + isNullish(aNullableFloat64List) ? nil : aNullableFloat64List!.toFloat64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in generic Object. + @objc func echoNullableObject(aNullableObject: NSObject, wrappedError: NiTestsError) -> NSObject? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable(_PigeonFfiCodec.readValue(value: aNullableObject)), isObject: true) + as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableList(aNullableList: [NSObject]?, wrappedError: NiTestsError) -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + _PigeonFfiCodec.readValue(value: aNullableList as NSObject?, type: "Object") as? [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableEnumList(enumList: [NSObject]?, wrappedError: NiTestsError) -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableClassList(classList: [NSObject]?, wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableNonNullEnumList(enumList: [NSObject]?, wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableNonNullClassList(classList: [NSObject]?, wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableMap(map: [NSObject: NSObject]?, wrappedError: NiTestsError) -> [NSObject: + NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + _PigeonFfiCodec.readValue(value: map as NSObject?, type: "Object", type2: "Object") + as? [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableStringMap(stringMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableIntMap(intMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableEnumMap(enumMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableClassMap(classMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullStringMap( + stringMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String: String])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullIntMap(intMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64: Int64])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullEnumMap(enumMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum: NIAnEnum])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullClassMap( + classMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64: NIAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func echoNullableEnum(anEnum: NSNumber?, wrappedError: NiTestsError) -> NSNumber? { + do { + let res = try api!.echoNullable( + isNullish(anEnum) ? nil : NIAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func echoAnotherNullableEnum(anotherEnum: NSNumber?, wrappedError: NiTestsError) + -> NSNumber? + { + do { + let res = try api!.echoNullable( + isNullish(anotherEnum) ? nil : NIAnotherEnum.init(rawValue: anotherEnum!.intValue))? + .rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in int. + @objc func echoOptionalNullableInt(aNullableInt: NSNumber?, wrappedError: NiTestsError) + -> NSNumber? + { + do { + return try isNullish( + api!.echoOptional(isNullish(aNullableInt) ? nil : aNullableInt!.int64Value)) + ? nil + : NSNumber( + value: api!.echoOptional(isNullish(aNullableInt) ? nil : aNullableInt!.int64Value)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in string. + @objc func echoNamedNullableString(aNullableString: NSString?, wrappedError: NiTestsError) + -> NSString? + { + do { + return try api!.echoNamed(aNullableString as String?) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + @objc func noopAsync(wrappedError: NiTestsError) async { + do { + return try await api!.noopAsync() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + /// Returns passed in int asynchronously. + @objc func echoAsyncInt(anInt: Int64, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(anInt)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in double asynchronously. + @objc func echoAsyncDouble(aDouble: Double, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(aDouble)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in boolean asynchronously. + @objc func echoAsyncBool(aBool: Bool, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(aBool)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed string asynchronously. + @objc func echoAsyncString(aString: NSString, wrappedError: NiTestsError) async -> NSString? { + do { + return try await api!.echoAsync(aString as String) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Uint8List asynchronously. + @objc func echoAsyncUint8List(aUint8List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.echoAsync(aUint8List.toUint8Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int32List asynchronously. + @objc func echoAsyncInt32List(aInt32List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.echoAsync(aInt32List.toInt32Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int64List asynchronously. + @objc func echoAsyncInt64List(aInt64List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.echoAsync(aInt64List.toInt64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Float64List asynchronously. + @objc func echoAsyncFloat64List(aFloat64List: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.echoAsync(aFloat64List.toFloat64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in generic Object asynchronously. + @objc func echoAsyncObject(anObject: NSObject, wrappedError: NiTestsError) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync(_PigeonFfiCodec.readValue(value: anObject)!), isObject: true) + as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test asynchronous serialization and deserialization. + @objc func echoAsyncList(list: [NSObject], wrappedError: NiTestsError) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + _PigeonFfiCodec.readValue(value: list as NSObject, type: "Object") as! [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test asynchronous serialization and deserialization. + @objc func echoAsyncEnumList(enumList: [NSObject], wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test asynchronous serialization and deserialization. + @objc func echoAsyncClassList(classList: [NSObject], wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncMap(map: [NSObject: NSObject], wrappedError: NiTestsError) async -> [NSObject: + NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + _PigeonFfiCodec.readValue(value: map as NSObject, type: "Object", type2: "Object") + as! [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncStringMap(stringMap: [NSObject: NSObject], wrappedError: NiTestsError) async + -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncIntMap(intMap: [NSObject: NSObject], wrappedError: NiTestsError) async + -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncEnumMap(enumMap: [NSObject: NSObject], wrappedError: NiTestsError) async + -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") + as! [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncClassMap(classMap: [NSObject: NSObject], wrappedError: NiTestsError) async + -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllNullableTypes") + as! [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @objc func echoAsyncEnum(anEnum: NIAnEnum, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(anEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @objc func echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.echoAsync(anotherEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Responds with an error from an async function returning a value. + @objc func throwAsyncError(wrappedError: NiTestsError) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue(value: api!.throwAsyncError(), isObject: true) + as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Responds with an error from an async void function. + @objc func throwAsyncErrorFromVoid(wrappedError: NiTestsError) async { + do { + return try await api!.throwAsyncErrorFromVoid() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + /// Responds with a Flutter error from an async function returning a value. + @objc func throwAsyncFlutterError(wrappedError: NiTestsError) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.throwAsyncFlutterError(), isObject: true) as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed object, to test async serialization and deserialization. + @objc func echoAsyncNIAllTypes(everything: NIAllTypesBridge, wrappedError: NiTestsError) async + -> NIAllTypesBridge? + { + do { + return try await NIAllTypesBridge.fromSwift(api!.echoAsync(everything.toSwift()))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed object, to test serialization and deserialization. + @objc func echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypesBridge?, wrappedError: NiTestsError + ) async -> NIAllNullableTypesBridge? { + do { + return try await NIAllNullableTypesBridge.fromSwift( + api!.echoAsync(isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed object, to test serialization and deserialization. + @objc func echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge?, wrappedError: NiTestsError + ) async -> NIAllNullableTypesWithoutRecursionBridge? { + do { + return try await NIAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.echoAsync(isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in int asynchronously. + @objc func echoAsyncNullableInt(anInt: NSNumber?, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await isNullish(api!.echoAsyncNullable(isNullish(anInt) ? nil : anInt!.int64Value)) + ? nil : NSNumber(value: api!.echoAsyncNullable(isNullish(anInt) ? nil : anInt!.int64Value)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns passed in double asynchronously. + @objc func echoAsyncNullableDouble(aDouble: NSNumber?, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + return try await isNullish( + api!.echoAsyncNullable(isNullish(aDouble) ? nil : aDouble!.doubleValue)) + ? nil + : NSNumber(value: api!.echoAsyncNullable(isNullish(aDouble) ? nil : aDouble!.doubleValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in boolean asynchronously. + @objc func echoAsyncNullableBool(aBool: NSNumber?, wrappedError: NiTestsError) async -> NSNumber? + { + do { + return try await isNullish(api!.echoAsyncNullable(isNullish(aBool) ? nil : aBool!.boolValue)) + ? nil : NSNumber(value: api!.echoAsyncNullable(isNullish(aBool) ? nil : aBool!.boolValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed string asynchronously. + @objc func echoAsyncNullableString(aString: NSString?, wrappedError: NiTestsError) async + -> NSString? + { + do { + return try await api!.echoAsyncNullable(aString as String?) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Uint8List asynchronously. + @objc func echoAsyncNullableUint8List( + aUint8List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + isNullish(aUint8List) ? nil : aUint8List!.toUint8Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int32List asynchronously. + @objc func echoAsyncNullableInt32List( + aInt32List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + isNullish(aInt32List) ? nil : aInt32List!.toInt32Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Int64List asynchronously. + @objc func echoAsyncNullableInt64List( + aInt64List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + isNullish(aInt64List) ? nil : aInt64List!.toInt64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in Float64List asynchronously. + @objc func echoAsyncNullableFloat64List( + aFloat64List: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + isNullish(aFloat64List) ? nil : aFloat64List!.toFloat64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed in generic Object asynchronously. + @objc func echoAsyncNullableObject(anObject: NSObject, wrappedError: NiTestsError) async + -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable(_PigeonFfiCodec.readValue(value: anObject)), isObject: true) + as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableList(list: [NSObject]?, wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + _PigeonFfiCodec.readValue(value: list as NSObject?, type: "Object") as? [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableEnumList(enumList: [NSObject]?, wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed list, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableClassList(classList: [NSObject]?, wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableMap(map: [NSObject: NSObject]?, wrappedError: NiTestsError) async + -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + _PigeonFfiCodec.readValue(value: map as NSObject?, type: "Object", type2: "Object") + as? [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableStringMap( + stringMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableIntMap(intMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableEnumMap(enumMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed map, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableClassMap(classMap: [NSObject: NSObject]?, wrappedError: NiTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @objc func echoAsyncNullableEnum(anEnum: NSNumber?, wrappedError: NiTestsError) async -> NSNumber? + { + do { + let res = try await api!.echoAsyncNullable( + isNullish(anEnum) ? nil : NIAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @objc func echoAnotherAsyncNullableEnum(anotherEnum: NSNumber?, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + let res = try await api!.echoAsyncNullable( + isNullish(anotherEnum) ? nil : NIAnotherEnum.init(rawValue: anotherEnum!.intValue))? + .rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterNoop(wrappedError: NiTestsError) { + do { + return try api!.callFlutterNoop() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + @objc func callFlutterThrowError(wrappedError: NiTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue(value: api!.callFlutterThrowError(), isObject: true) + as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterThrowErrorFromVoid(wrappedError: NiTestsError) { + do { + return try api!.callFlutterThrowErrorFromVoid() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + @objc func callFlutterEchoNIAllTypes(everything: NIAllTypesBridge, wrappedError: NiTestsError) + -> NIAllTypesBridge? + { + do { + return try NIAllTypesBridge.fromSwift(api!.callFlutterEcho(everything.toSwift()))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNIAllNullableTypes( + everything: NIAllNullableTypesBridge?, wrappedError: NiTestsError + ) -> NIAllNullableTypesBridge? { + do { + return try NIAllNullableTypesBridge.fromSwift( + api!.callFlutterEcho(isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterSendMultipleNullableTypes( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + wrappedError: NiTestsError + ) -> NIAllNullableTypesBridge? { + do { + return try NIAllNullableTypesBridge.fromSwift( + api!.callFlutterSendMultipleNullableTypes( + aBool: isNullish(aNullableBool) ? nil : aNullableBool!.boolValue, + anInt: isNullish(aNullableInt) ? nil : aNullableInt!.int64Value, + aString: aNullableString as String?))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge?, wrappedError: NiTestsError + ) -> NIAllNullableTypesWithoutRecursionBridge? { + do { + return try NIAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.callFlutterEcho(isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + wrappedError: NiTestsError + ) -> NIAllNullableTypesWithoutRecursionBridge? { + do { + return try NIAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.callFlutterSendMultipleNullableTypesWithoutRecursion( + aBool: isNullish(aNullableBool) ? nil : aNullableBool!.boolValue, + anInt: isNullish(aNullableInt) ? nil : aNullableInt!.int64Value, + aString: aNullableString as String?))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoBool(aBool: Bool, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(aBool)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoInt(anInt: Int64, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(anInt)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoDouble(aDouble: Double, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(aDouble)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoString(aString: NSString, wrappedError: NiTestsError) -> NSString? { + do { + return try api!.callFlutterEcho(aString as String) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoUint8List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.callFlutterEcho(list.toUint8Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoInt32List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.callFlutterEcho(list.toInt32Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoInt64List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.callFlutterEcho(list.toInt64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoFloat64List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + -> NiTestsPigeonTypedData? + { + do { + let res = try api!.callFlutterEcho(list.toFloat64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoList(list: [NSObject], wrappedError: NiTestsError) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + _PigeonFfiCodec.readValue(value: list as NSObject, type: "Object") as! [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoEnumList(enumList: [NSObject], wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoClassList(classList: [NSObject], wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNonNullEnumList(enumList: [NSObject], wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNonNullClassList(classList: [NSObject], wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoMap(map: [NSObject: NSObject], wrappedError: NiTestsError) -> [NSObject: + NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + _PigeonFfiCodec.readValue(value: map as NSObject, type: "Object", type2: "Object") + as! [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoStringMap(stringMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoIntMap(intMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoEnumMap(enumMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") + as! [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoClassMap(classMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllNullableTypes") + as! [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNonNullStringMap( + stringMap: [NSObject: NSObject], wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String: String])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNonNullIntMap(intMap: [NSObject: NSObject], wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64: Int64])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNonNullEnumMap( + enumMap: [NSObject: NSObject], wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") + as! [NIAnEnum: NIAnEnum])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNonNullClassMap( + classMap: [NSObject: NSObject], wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllNullableTypes") + as! [Int64: NIAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoEnum(anEnum: NIAnEnum, wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(anEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNIAnotherEnum(anotherEnum: NIAnotherEnum, wrappedError: NiTestsError) + -> NSNumber? + { + do { + return try NSNumber(value: api!.callFlutterEcho(anotherEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableBool(aBool: NSNumber?, wrappedError: NiTestsError) -> NSNumber? + { + do { + return try isNullish(api!.callFlutterEchoNullable(isNullish(aBool) ? nil : aBool!.boolValue)) + ? nil + : NSNumber(value: api!.callFlutterEchoNullable(isNullish(aBool) ? nil : aBool!.boolValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableInt(anInt: NSNumber?, wrappedError: NiTestsError) -> NSNumber? { + do { + return try isNullish(api!.callFlutterEchoNullable(isNullish(anInt) ? nil : anInt!.int64Value)) + ? nil + : NSNumber(value: api!.callFlutterEchoNullable(isNullish(anInt) ? nil : anInt!.int64Value)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableDouble(aDouble: NSNumber?, wrappedError: NiTestsError) + -> NSNumber? + { + do { + return try isNullish( + api!.callFlutterEchoNullable(isNullish(aDouble) ? nil : aDouble!.doubleValue)) + ? nil + : NSNumber( + value: api!.callFlutterEchoNullable(isNullish(aDouble) ? nil : aDouble!.doubleValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableString(aString: NSString?, wrappedError: NiTestsError) + -> NSString? + { + do { + return try api!.callFlutterEchoNullable(aString as String?) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableUint8List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable(isNullish(list) ? nil : list!.toUint8Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableInt32List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable(isNullish(list) ? nil : list!.toInt32Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableInt64List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable(isNullish(list) ? nil : list!.toInt64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableFloat64List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) -> NiTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable(isNullish(list) ? nil : list!.toFloat64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableList(list: [NSObject]?, wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + _PigeonFfiCodec.readValue(value: list as NSObject?, type: "Object") as? [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableEnumList(enumList: [NSObject]?, wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableClassList(classList: [NSObject]?, wrappedError: NiTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableNonNullEnumList( + enumList: [NSObject]?, wrappedError: NiTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableNonNullClassList( + classList: [NSObject]?, wrappedError: NiTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableMap(map: [NSObject: NSObject]?, wrappedError: NiTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + _PigeonFfiCodec.readValue(value: map as NSObject?, type: "Object", type2: "Object") + as? [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableStringMap( + stringMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableIntMap( + intMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableEnumMap( + enumMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableClassMap( + classMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableNonNullStringMap( + stringMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String: String])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableNonNullIntMap( + intMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64: Int64])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableNonNullEnumMap( + enumMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum: NIAnEnum])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableNonNullClassMap( + classMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64: NIAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoNullableEnum(anEnum: NSNumber?, wrappedError: NiTestsError) -> NSNumber? + { + do { + let res = try api!.callFlutterEchoNullable( + isNullish(anEnum) ? nil : NIAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAnotherNullableEnum(anotherEnum: NSNumber?, wrappedError: NiTestsError) + -> NSNumber? + { + do { + let res = try api!.callFlutterEchoNullable( + isNullish(anotherEnum) ? nil : NIAnotherEnum.init(rawValue: anotherEnum!.intValue))? + .rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterNoopAsync(wrappedError: NiTestsError) async { + do { + return try await api!.callFlutterNoopAsync() + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return + } + @objc func callFlutterEchoAsyncNIAllTypes( + everything: NIAllTypesBridge, wrappedError: NiTestsError + ) async -> NIAllTypesBridge? { + do { + return try await NIAllTypesBridge.fromSwift( + api!.callFlutterEchoAsyncNIAllTypes(everything: everything.toSwift()))! + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypesBridge?, wrappedError: NiTestsError + ) async -> NIAllNullableTypesBridge? { + do { + return try await NIAllNullableTypesBridge.fromSwift( + api!.callFlutterEchoAsyncNullableNIAllNullableTypes( + everything: isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge?, wrappedError: NiTestsError + ) async -> NIAllNullableTypesWithoutRecursionBridge? { + do { + return try await NIAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncBool(aBool: Bool, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncBool(aBool: aBool)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncInt(anInt: Int64, wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncInt(anInt: anInt)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncDouble(aDouble: Double, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncDouble(aDouble: aDouble)) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncString(aString: NSString, wrappedError: NiTestsError) async + -> NSString? + { + do { + return try await api!.callFlutterEchoAsyncString(aString: aString as String) as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncUint8List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.callFlutterEchoAsyncUint8List(list: list.toUint8Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncInt32List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.callFlutterEchoAsyncInt32List(list: list.toInt32Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncInt64List(list: NiTestsPigeonTypedData, wrappedError: NiTestsError) + async -> NiTestsPigeonTypedData? + { + do { + let res = try await api!.callFlutterEchoAsyncInt64List(list: list.toInt64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncFloat64List( + list: NiTestsPigeonTypedData, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncFloat64List(list: list.toFloat64Array()!) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncObject(anObject: NSObject, wrappedError: NiTestsError) async + -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncObject( + anObject: _PigeonFfiCodec.readValue(value: anObject)!), isObject: true) as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncList(list: [NSObject], wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncList( + list: _PigeonFfiCodec.readValue(value: list as NSObject, type: "Object") as! [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncEnumList(enumList: [NSObject], wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncEnumList( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncClassList(classList: [NSObject], wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNonNullEnumList(enumList: [NSObject], wrappedError: NiTestsError) + async -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNonNullEnumList( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject, type: "NIAnEnum") + as! [NIAnEnum])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNonNullClassList(classList: [NSObject], wrappedError: NiTestsError) + async -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNonNullClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NIAllNullableTypes") as! [NIAllNullableTypes])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncMap(map: [NSObject: NSObject], wrappedError: NiTestsError) async + -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncMap( + map: _PigeonFfiCodec.readValue(value: map as NSObject, type: "Object", type2: "Object") + as! [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncStringMap( + stringMap: [NSObject: NSObject], wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncStringMap( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject, type: "String", type2: "String") as! [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncIntMap(intMap: [NSObject: NSObject], wrappedError: NiTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncIntMap( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject, type: "int", type2: "int") + as! [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncEnumMap(enumMap: [NSObject: NSObject], wrappedError: NiTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncEnumMap( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NIAnEnum", type2: "NIAnEnum") + as! [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncClassMap( + classMap: [NSObject: NSObject], wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncClassMap( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NIAllNullableTypes") + as! [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncEnum(anEnum: NIAnEnum, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncEnum(anEnum: anEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum, wrappedError: NiTestsError) + async -> NSNumber? + { + do { + return try await NSNumber( + value: api!.callFlutterEchoAnotherAsyncEnum(anotherEnum: anotherEnum).rawValue) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableBool(aBool: NSNumber?, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + return try await isNullish( + api!.callFlutterEchoAsyncNullableBool(aBool: isNullish(aBool) ? nil : aBool!.boolValue)) + ? nil + : NSNumber( + value: api!.callFlutterEchoAsyncNullableBool( + aBool: isNullish(aBool) ? nil : aBool!.boolValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableInt(anInt: NSNumber?, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + return try await isNullish( + api!.callFlutterEchoAsyncNullableInt(anInt: isNullish(anInt) ? nil : anInt!.int64Value)) + ? nil + : NSNumber( + value: api!.callFlutterEchoAsyncNullableInt( + anInt: isNullish(anInt) ? nil : anInt!.int64Value)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableDouble(aDouble: NSNumber?, wrappedError: NiTestsError) + async -> NSNumber? + { + do { + return try await isNullish( + api!.callFlutterEchoAsyncNullableDouble( + aDouble: isNullish(aDouble) ? nil : aDouble!.doubleValue)) + ? nil + : NSNumber( + value: api!.callFlutterEchoAsyncNullableDouble( + aDouble: isNullish(aDouble) ? nil : aDouble!.doubleValue)!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableString(aString: NSString?, wrappedError: NiTestsError) + async -> NSString? + { + do { + return try await api!.callFlutterEchoAsyncNullableString(aString: aString as String?) + as NSString? + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableUint8List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableUint8List( + list: isNullish(list) ? nil : list!.toUint8Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableInt32List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableInt32List( + list: isNullish(list) ? nil : list!.toInt32Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableInt64List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableInt64List( + list: isNullish(list) ? nil : list!.toInt64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableFloat64List( + list: NiTestsPigeonTypedData?, wrappedError: NiTestsError + ) async -> NiTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableFloat64List( + list: isNullish(list) ? nil : list!.toFloat64Array()) + return isNullish(res) ? nil : NiTestsPigeonTypedData(res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterThrowFlutterErrorAsync(wrappedError: NiTestsError) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterThrowFlutterErrorAsync(), isObject: true) as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableObject(anObject: NSObject, wrappedError: NiTestsError) + async -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableObject( + anObject: _PigeonFfiCodec.readValue(value: anObject)), isObject: true) as? NSObject + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableList(list: [NSObject]?, wrappedError: NiTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableList( + list: _PigeonFfiCodec.readValue(value: list as NSObject?, type: "Object") as? [Any?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableEnumList(enumList: [NSObject]?, wrappedError: NiTestsError) + async -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableEnumList( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum?])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableClassList( + classList: [NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes?])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableNonNullEnumList( + enumList: [NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableNonNullEnumList( + enumList: _PigeonFfiCodec.readValue(value: enumList as NSObject?, type: "NIAnEnum") + as? [NIAnEnum])) as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableNonNullClassList( + classList: [NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableNonNullClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NIAllNullableTypes") as? [NIAllNullableTypes])) + as? [NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableMap(map: [NSObject: NSObject]?, wrappedError: NiTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableMap( + map: _PigeonFfiCodec.readValue(value: map as NSObject?, type: "Object", type2: "Object") + as? [AnyHashable?: Any?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableStringMap( + stringMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableStringMap( + stringMap: _PigeonFfiCodec.readValue( + value: stringMap as NSObject?, type: "String", type2: "String") as? [String?: String?])) + as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableIntMap( + intMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableIntMap( + intMap: _PigeonFfiCodec.readValue(value: intMap as NSObject?, type: "int", type2: "int") + as? [Int64?: Int64?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableEnumMap( + enumMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableEnumMap( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NIAnEnum", type2: "NIAnEnum") + as? [NIAnEnum?: NIAnEnum?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableClassMap( + classMap: [NSObject: NSObject]?, wrappedError: NiTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableClassMap( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NIAllNullableTypes") + as? [Int64?: NIAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAsyncNullableEnum(anEnum: NSNumber?, wrappedError: NiTestsError) async + -> NSNumber? + { + do { + let res = try await api!.callFlutterEchoAsyncNullableEnum( + anEnum: isNullish(anEnum) ? nil : NIAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + @objc func callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NSNumber?, wrappedError: NiTestsError + ) async -> NSNumber? { + do { + let res = try await api!.callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: isNullish(anotherEnum) + ? nil : NIAnotherEnum.init(rawValue: anotherEnum!.intValue))?.rawValue + return isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Returns true if the handler is run on a main thread. + @objc func defaultIsMainThread(wrappedError: NiTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.defaultIsMainThread()) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } + /// Spawns a background thread and calls `noop` on the [NIFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + @objc func callFlutterNoopOnBackgroundThread(wrappedError: NiTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.callFlutterNoopOnBackgroundThread()) + } catch let error as NiTestsError { + wrappedError.code = error.code + wrappedError.message = error.message + wrappedError.details = error.details + } catch let error { + wrappedError.code = "\(error)" + wrappedError.message = "\(type(of: error))" + wrappedError.details = "Stacktrace: \(Thread.callStackSymbols)" + } + return nil + } +} + +/// The core interface that the Dart platform_test code implements for host +/// integration tests to call into. +/// +/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift. +@available(iOS 13, macOS 10.15, *) +@objc protocol NIFlutterIntegrationCoreApiBridge { + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + @objc func noop(error: NiTestsError) + /// Returns a Flutter error, to test error handling. + @objc func throwFlutterError(error: NiTestsError) -> NSObject? + /// Responds with an error from an async function returning a value. + @objc func throwError(error: NiTestsError) -> NSObject? + /// Responds with an error from an async void function. + @objc func throwErrorFromVoid(error: NiTestsError) + /// Returns the passed object, to test serialization and deserialization. + @objc func echoNIAllTypes(everything: NIAllTypesBridge?, error: NiTestsError) -> NIAllTypesBridge? + /// Returns the passed object, to test serialization and deserialization. + @objc func echoNIAllNullableTypes(everything: NIAllNullableTypesBridge?, error: NiTestsError) + -> NIAllNullableTypesBridge? + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @objc func sendMultipleNullableTypes( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + error: NiTestsError + ) -> NIAllNullableTypesBridge? + /// Returns the passed object, to test serialization and deserialization. + @objc func echoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge?, error: NiTestsError + ) -> NIAllNullableTypesWithoutRecursionBridge? + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @objc func sendMultipleNullableTypesWithoutRecursion( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + error: NiTestsError + ) -> NIAllNullableTypesWithoutRecursionBridge? + /// Returns the passed boolean, to test serialization and deserialization. + @objc func echoBool(aBool: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed int, to test serialization and deserialization. + @objc func echoInt(anInt: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed double, to test serialization and deserialization. + @objc func echoDouble(aDouble: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed string, to test serialization and deserialization. + @objc func echoString(aString: NSString?, error: NiTestsError) -> NSString? + /// Returns the passed byte list, to test serialization and deserialization. + @objc func echoUint8List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed int32 list, to test serialization and deserialization. + @objc func echoInt32List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed int64 list, to test serialization and deserialization. + @objc func echoInt64List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed float64 list, to test serialization and deserialization. + @objc func echoFloat64List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoList(list: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoEnumList(enumList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoClassList(classList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNonNullEnumList(enumList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNonNullClassList(classList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoMap(map: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoStringMap(stringMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoIntMap(intMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoEnumMap(enumMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoClassMap(classMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullStringMap(stringMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullIntMap(intMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullEnumMap(enumMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullClassMap(classMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoEnum(anEnum: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoNIAnotherEnum(anotherEnum: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed boolean, to test serialization and deserialization. + @objc func echoNullableBool(aBool: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed int, to test serialization and deserialization. + @objc func echoNullableInt(anInt: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed double, to test serialization and deserialization. + @objc func echoNullableDouble(aDouble: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed string, to test serialization and deserialization. + @objc func echoNullableString(aString: NSString?, error: NiTestsError) -> NSString? + /// Returns the passed byte list, to test serialization and deserialization. + @objc func echoNullableUint8List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed int32 list, to test serialization and deserialization. + @objc func echoNullableInt32List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed int64 list, to test serialization and deserialization. + @objc func echoNullableInt64List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed float64 list, to test serialization and deserialization. + @objc func echoNullableFloat64List(list: NiTestsPigeonTypedData?, error: NiTestsError) + -> NiTestsPigeonTypedData? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableList(list: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableEnumList(enumList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableClassList(classList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableNonNullEnumList(enumList: [NSObject]?, error: NiTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableNonNullClassList(classList: [NSObject]?, error: NiTestsError) + -> [NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableMap(map: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableStringMap(stringMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableIntMap(intMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableEnumMap(enumMap: [NSObject: NSObject]?, error: NiTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableClassMap(classMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullStringMap(stringMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullIntMap(intMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullEnumMap(enumMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullClassMap(classMap: [NSObject: NSObject]?, error: NiTestsError) + -> [NSObject: NSObject]? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoNullableEnum(anEnum: NSNumber?, error: NiTestsError) -> NSNumber? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoAnotherNullableEnum(anotherEnum: NSNumber?, error: NiTestsError) -> NSNumber? + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + @objc func noopAsync(error: NiTestsError) async + @objc func throwFlutterErrorAsync(error: NiTestsError) async -> NSObject? + @objc func echoAsyncNIAllTypes(everything: NIAllTypesBridge?, error: NiTestsError) async + -> NIAllTypesBridge? + @objc func echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypesBridge?, error: NiTestsError + ) async -> NIAllNullableTypesBridge? + @objc func echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge?, error: NiTestsError + ) async -> NIAllNullableTypesWithoutRecursionBridge? + @objc func echoAsyncBool(aBool: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncInt(anInt: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncDouble(aDouble: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncString(aString: NSString?, error: NiTestsError) async -> NSString? + @objc func echoAsyncUint8List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncInt32List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncInt64List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncFloat64List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncObject(anObject: NSObject?, error: NiTestsError) async -> NSObject? + @objc func echoAsyncList(list: [NSObject]?, error: NiTestsError) async -> [NSObject]? + @objc func echoAsyncEnumList(enumList: [NSObject]?, error: NiTestsError) async -> [NSObject]? + @objc func echoAsyncClassList(classList: [NSObject]?, error: NiTestsError) async -> [NSObject]? + @objc func echoAsyncNonNullEnumList(enumList: [NSObject]?, error: NiTestsError) async + -> [NSObject]? + @objc func echoAsyncNonNullClassList(classList: [NSObject]?, error: NiTestsError) async + -> [NSObject]? + @objc func echoAsyncMap(map: [NSObject: NSObject]?, error: NiTestsError) async -> [NSObject: + NSObject]? + @objc func echoAsyncStringMap(stringMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncIntMap(intMap: [NSObject: NSObject]?, error: NiTestsError) async -> [NSObject: + NSObject]? + @objc func echoAsyncEnumMap(enumMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncClassMap(classMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncEnum(anEnum: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAnotherAsyncEnum(anotherEnum: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncNullableBool(aBool: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncNullableInt(anInt: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncNullableDouble(aDouble: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAsyncNullableString(aString: NSString?, error: NiTestsError) async -> NSString? + @objc func echoAsyncNullableUint8List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncNullableInt32List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncNullableInt64List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncNullableFloat64List(list: NiTestsPigeonTypedData?, error: NiTestsError) async + -> NiTestsPigeonTypedData? + @objc func echoAsyncNullableObject(anObject: NSObject?, error: NiTestsError) async -> NSObject? + @objc func echoAsyncNullableList(list: [NSObject]?, error: NiTestsError) async -> [NSObject]? + @objc func echoAsyncNullableEnumList(enumList: [NSObject]?, error: NiTestsError) async + -> [NSObject]? + @objc func echoAsyncNullableClassList(classList: [NSObject]?, error: NiTestsError) async + -> [NSObject]? + @objc func echoAsyncNullableNonNullEnumList(enumList: [NSObject]?, error: NiTestsError) async + -> [NSObject]? + @objc func echoAsyncNullableNonNullClassList(classList: [NSObject]?, error: NiTestsError) async + -> [NSObject]? + @objc func echoAsyncNullableMap(map: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncNullableStringMap(stringMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncNullableIntMap(intMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncNullableEnumMap(enumMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncNullableClassMap(classMap: [NSObject: NSObject]?, error: NiTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncNullableEnum(anEnum: NSNumber?, error: NiTestsError) async -> NSNumber? + @objc func echoAnotherAsyncNullableEnum(anotherEnum: NSNumber?, error: NiTestsError) async + -> NSNumber? +} + +@available(iOS 13, macOS 10.15, *) +@objc class NIFlutterIntegrationCoreApiRegistrar: NSObject { + static var registeredNIFlutterIntegrationCoreApi = [String: NIFlutterIntegrationCoreApi]() + + @objc static func registerInstance( + api: NIFlutterIntegrationCoreApiBridge, name: String = defaultInstanceName + ) { + NIFlutterIntegrationCoreApiRegistrar.registeredNIFlutterIntegrationCoreApi[name] = + NIFlutterIntegrationCoreApi(api: api) + } + + static func getInstance(name: String = defaultInstanceName) -> NIFlutterIntegrationCoreApi? { + return NIFlutterIntegrationCoreApiRegistrar.registeredNIFlutterIntegrationCoreApi[name] + } +} + +@available(iOS 13, macOS 10.15, *) +class NIFlutterIntegrationCoreApi { + private let api: NIFlutterIntegrationCoreApiBridge? + + fileprivate init(api: NIFlutterIntegrationCoreApiBridge) { + self.api = api + } + + static func getInstance(name: String = defaultInstanceName) -> NIFlutterIntegrationCoreApi? { + return NIFlutterIntegrationCoreApiRegistrar.getInstance(name: name) + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + func noop() throws { + let error = NiTestsError() + api!.noop(error: error) + if error.code != nil { + throw error + } + } + + /// Returns a Flutter error, to test error handling. + func throwFlutterError() throws -> Any? { + let error = NiTestsError() + let res = api!.throwFlutterError(error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Object") + } + + /// Responds with an error from an async function returning a value. + func throwError() throws -> Any? { + let error = NiTestsError() + let res = api!.throwError(error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Object") + } + + /// Responds with an error from an async void function. + func throwErrorFromVoid() throws { + let error = NiTestsError() + api!.throwErrorFromVoid(error: error) + if error.code != nil { + throw error + } + } + + /// Returns the passed object, to test serialization and deserialization. + func echoNIAllTypes(everything: NIAllTypes) throws -> NIAllTypes { + let error = NiTestsError() + let res = api!.echoNIAllTypes(everything: NIAllTypesBridge.fromSwift(everything)!, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllTypes") as! NIAllTypes + } + + /// Returns the passed object, to test serialization and deserialization. + func echoNIAllNullableTypes(everything: NIAllNullableTypes?) throws -> NIAllNullableTypes? { + let error = NiTestsError() + let res = api!.echoNIAllNullableTypes( + everything: NIAllNullableTypesBridge.fromSwift(everything), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllNullableTypes") + as! NIAllNullableTypes? + } + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + func sendMultipleNullableTypes( + aNullableBool: Bool?, aNullableInt: Int64?, aNullableString: String? + ) throws -> NIAllNullableTypes { + let error = NiTestsError() + let res = api!.sendMultipleNullableTypes( + aNullableBool: isNullish(aNullableBool) ? nil : NSNumber(value: aNullableBool!), + aNullableInt: isNullish(aNullableInt) ? nil : NSNumber(value: aNullableInt!), + aNullableString: aNullableString as NSString?, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllNullableTypes") + as! NIAllNullableTypes + } + + /// Returns the passed object, to test serialization and deserialization. + func echoNIAllNullableTypesWithoutRecursion(everything: NIAllNullableTypesWithoutRecursion?) + throws -> NIAllNullableTypesWithoutRecursion? + { + let error = NiTestsError() + let res = api!.echoNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge.fromSwift(everything), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllNullableTypesWithoutRecursion") + as! NIAllNullableTypesWithoutRecursion? + } + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + func sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Bool?, aNullableInt: Int64?, aNullableString: String? + ) throws -> NIAllNullableTypesWithoutRecursion { + let error = NiTestsError() + let res = api!.sendMultipleNullableTypesWithoutRecursion( + aNullableBool: isNullish(aNullableBool) ? nil : NSNumber(value: aNullableBool!), + aNullableInt: isNullish(aNullableInt) ? nil : NSNumber(value: aNullableInt!), + aNullableString: aNullableString as NSString?, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllNullableTypesWithoutRecursion") + as! NIAllNullableTypesWithoutRecursion + } + + /// Returns the passed boolean, to test serialization and deserialization. + func echoBool(aBool: Bool) throws -> Bool { + let error = NiTestsError() + let res = api!.echoBool(aBool: NSNumber(value: aBool), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "bool") as! Bool + } + + /// Returns the passed int, to test serialization and deserialization. + func echoInt(anInt: Int64) throws -> Int64 { + let error = NiTestsError() + let res = api!.echoInt(anInt: NSNumber(value: anInt), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "int") as! Int64 + } + + /// Returns the passed double, to test serialization and deserialization. + func echoDouble(aDouble: Double) throws -> Double { + let error = NiTestsError() + let res = api!.echoDouble(aDouble: NSNumber(value: aDouble), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "double") as! Double + } + + /// Returns the passed string, to test serialization and deserialization. + func echoString(aString: String) throws -> String { + let error = NiTestsError() + let res = api!.echoString(aString: aString as NSString?, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "String") as! String + } + + /// Returns the passed byte list, to test serialization and deserialization. + func echoUint8List(list: [UInt8]) throws -> [UInt8] { + let error = NiTestsError() + let res = api!.echoUint8List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Uint8List") as! [UInt8] + } + + /// Returns the passed int32 list, to test serialization and deserialization. + func echoInt32List(list: [Int32]) throws -> [Int32] { + let error = NiTestsError() + let res = api!.echoInt32List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int32List") as! [Int32] + } + + /// Returns the passed int64 list, to test serialization and deserialization. + func echoInt64List(list: [Int64]) throws -> [Int64] { + let error = NiTestsError() + let res = api!.echoInt64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int64List") as! [Int64] + } + + /// Returns the passed float64 list, to test serialization and deserialization. + func echoFloat64List(list: [Float64]) throws -> [Float64] { + let error = NiTestsError() + let res = api!.echoFloat64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Float64List") as! [Float64] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoList(list: [Any?]) throws -> [Any?] { + let error = NiTestsError() + let res = api!.echoList( + list: _PigeonFfiCodec.writeValue(value: list) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [Any?] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoEnumList(enumList: [NIAnEnum?]) throws -> [NIAnEnum?] { + let error = NiTestsError() + let res = api!.echoEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum?] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoClassList(classList: [NIAllNullableTypes?]) throws -> [NIAllNullableTypes?] { + let error = NiTestsError() + let res = api!.echoClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes?] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNonNullEnumList(enumList: [NIAnEnum]) throws -> [NIAnEnum] { + let error = NiTestsError() + let res = api!.echoNonNullEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNonNullClassList(classList: [NIAllNullableTypes]) throws -> [NIAllNullableTypes] { + let error = NiTestsError() + let res = api!.echoNonNullClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoMap(map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { + let error = NiTestsError() + let res = api!.echoMap( + map: _PigeonFfiCodec.writeValue(value: map) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [AnyHashable?: Any?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoStringMap(stringMap: [String?: String?]) throws -> [String?: String?] { + let error = NiTestsError() + let res = api!.echoStringMap( + stringMap: _PigeonFfiCodec.writeValue(value: stringMap) as? [NSObject: NSObject], error: error + ) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [String?: String?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoIntMap(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] { + let error = NiTestsError() + let res = api!.echoIntMap( + intMap: _PigeonFfiCodec.writeValue(value: intMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [Int64?: Int64?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]) throws -> [NIAnEnum?: NIAnEnum?] { + let error = NiTestsError() + let res = api!.echoEnumMap( + enumMap: _PigeonFfiCodec.writeValue(value: enumMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [NIAnEnum?: NIAnEnum?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoClassMap(classMap: [Int64?: NIAllNullableTypes?]) throws -> [Int64?: NIAllNullableTypes?] + { + let error = NiTestsError() + let res = api!.echoClassMap( + classMap: _PigeonFfiCodec.writeValue(value: classMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [Int64?: NIAllNullableTypes?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNonNullStringMap(stringMap: [String: String]) throws -> [String: String] { + let error = NiTestsError() + let res = api!.echoNonNullStringMap( + stringMap: _PigeonFfiCodec.writeValue(value: stringMap) as? [NSObject: NSObject], error: error + ) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [String: String] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNonNullIntMap(intMap: [Int64: Int64]) throws -> [Int64: Int64] { + let error = NiTestsError() + let res = api!.echoNonNullIntMap( + intMap: _PigeonFfiCodec.writeValue(value: intMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [Int64: Int64] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNonNullEnumMap(enumMap: [NIAnEnum: NIAnEnum]) throws -> [NIAnEnum: NIAnEnum] { + let error = NiTestsError() + let res = api!.echoNonNullEnumMap( + enumMap: _PigeonFfiCodec.writeValue(value: enumMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [NIAnEnum: NIAnEnum] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNonNullClassMap(classMap: [Int64: NIAllNullableTypes]) throws -> [Int64: + NIAllNullableTypes] + { + let error = NiTestsError() + let res = api!.echoNonNullClassMap( + classMap: _PigeonFfiCodec.writeValue(value: classMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [Int64: NIAllNullableTypes] + } + + /// Returns the passed enum to test serialization and deserialization. + func echoEnum(anEnum: NIAnEnum) throws -> NIAnEnum { + let error = NiTestsError() + let res = api!.echoEnum(anEnum: NSNumber(value: anEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnEnum") as! NIAnEnum + } + + /// Returns the passed enum to test serialization and deserialization. + func echoNIAnotherEnum(anotherEnum: NIAnotherEnum) throws -> NIAnotherEnum { + let error = NiTestsError() + let res = api!.echoNIAnotherEnum( + anotherEnum: NSNumber(value: anotherEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnotherEnum") as! NIAnotherEnum + } + + /// Returns the passed boolean, to test serialization and deserialization. + func echoNullableBool(aBool: Bool?) throws -> Bool? { + let error = NiTestsError() + let res = api!.echoNullableBool( + aBool: isNullish(aBool) ? nil : NSNumber(value: aBool!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "bool") as! Bool? + } + + /// Returns the passed int, to test serialization and deserialization. + func echoNullableInt(anInt: Int64?) throws -> Int64? { + let error = NiTestsError() + let res = api!.echoNullableInt( + anInt: isNullish(anInt) ? nil : NSNumber(value: anInt!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "int") as! Int64? + } + + /// Returns the passed double, to test serialization and deserialization. + func echoNullableDouble(aDouble: Double?) throws -> Double? { + let error = NiTestsError() + let res = api!.echoNullableDouble( + aDouble: isNullish(aDouble) ? nil : NSNumber(value: aDouble!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "double") as! Double? + } + + /// Returns the passed string, to test serialization and deserialization. + func echoNullableString(aString: String?) throws -> String? { + let error = NiTestsError() + let res = api!.echoNullableString(aString: aString as NSString?, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "String") as! String? + } + + /// Returns the passed byte list, to test serialization and deserialization. + func echoNullableUint8List(list: [UInt8]?) throws -> [UInt8]? { + let error = NiTestsError() + let res = api!.echoNullableUint8List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Uint8List") as! [UInt8]? + } + + /// Returns the passed int32 list, to test serialization and deserialization. + func echoNullableInt32List(list: [Int32]?) throws -> [Int32]? { + let error = NiTestsError() + let res = api!.echoNullableInt32List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int32List") as! [Int32]? + } + + /// Returns the passed int64 list, to test serialization and deserialization. + func echoNullableInt64List(list: [Int64]?) throws -> [Int64]? { + let error = NiTestsError() + let res = api!.echoNullableInt64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int64List") as! [Int64]? + } + + /// Returns the passed float64 list, to test serialization and deserialization. + func echoNullableFloat64List(list: [Float64]?) throws -> [Float64]? { + let error = NiTestsError() + let res = api!.echoNullableFloat64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Float64List") as! [Float64]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableList(list: [Any?]?) throws -> [Any?]? { + let error = NiTestsError() + let res = api!.echoNullableList( + list: _PigeonFfiCodec.writeValue(value: list) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [Any?]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableEnumList(enumList: [NIAnEnum?]?) throws -> [NIAnEnum?]? { + let error = NiTestsError() + let res = api!.echoNullableEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum?]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableClassList(classList: [NIAllNullableTypes?]?) throws -> [NIAllNullableTypes?]? { + let error = NiTestsError() + let res = api!.echoNullableClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes?]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNullEnumList(enumList: [NIAnEnum]?) throws -> [NIAnEnum]? { + let error = NiTestsError() + let res = api!.echoNullableNonNullEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNullClassList(classList: [NIAllNullableTypes]?) throws + -> [NIAllNullableTypes]? + { + let error = NiTestsError() + let res = api!.echoNullableNonNullClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableMap(map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? { + let error = NiTestsError() + let res = api!.echoNullableMap( + map: _PigeonFfiCodec.writeValue(value: map) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [AnyHashable?: Any?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableStringMap(stringMap: [String?: String?]?) throws -> [String?: String?]? { + let error = NiTestsError() + let res = api!.echoNullableStringMap( + stringMap: _PigeonFfiCodec.writeValue(value: stringMap) as? [NSObject: NSObject], error: error + ) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [String?: String?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableIntMap(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? { + let error = NiTestsError() + let res = api!.echoNullableIntMap( + intMap: _PigeonFfiCodec.writeValue(value: intMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [Int64?: Int64?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]?) throws -> [NIAnEnum?: NIAnEnum?]? { + let error = NiTestsError() + let res = api!.echoNullableEnumMap( + enumMap: _PigeonFfiCodec.writeValue(value: enumMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [NIAnEnum?: NIAnEnum?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableClassMap(classMap: [Int64?: NIAllNullableTypes?]?) throws -> [Int64?: + NIAllNullableTypes?]? + { + let error = NiTestsError() + let res = api!.echoNullableClassMap( + classMap: _PigeonFfiCodec.writeValue(value: classMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [Int64?: NIAllNullableTypes?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNullStringMap(stringMap: [String: String]?) throws -> [String: String]? { + let error = NiTestsError() + let res = api!.echoNullableNonNullStringMap( + stringMap: _PigeonFfiCodec.writeValue(value: stringMap) as? [NSObject: NSObject], error: error + ) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [String: String]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNullIntMap(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? { + let error = NiTestsError() + let res = api!.echoNullableNonNullIntMap( + intMap: _PigeonFfiCodec.writeValue(value: intMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [Int64: Int64]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNullEnumMap(enumMap: [NIAnEnum: NIAnEnum]?) throws -> [NIAnEnum: NIAnEnum]? { + let error = NiTestsError() + let res = api!.echoNullableNonNullEnumMap( + enumMap: _PigeonFfiCodec.writeValue(value: enumMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [NIAnEnum: NIAnEnum]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNullClassMap(classMap: [Int64: NIAllNullableTypes]?) throws -> [Int64: + NIAllNullableTypes]? + { + let error = NiTestsError() + let res = api!.echoNullableNonNullClassMap( + classMap: _PigeonFfiCodec.writeValue(value: classMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [Int64: NIAllNullableTypes]? + } + + /// Returns the passed enum to test serialization and deserialization. + func echoNullableEnum(anEnum: NIAnEnum?) throws -> NIAnEnum? { + let error = NiTestsError() + let res = api!.echoNullableEnum( + anEnum: isNullish(anEnum) ? nil : NSNumber(value: anEnum!.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnEnum") as! NIAnEnum? + } + + /// Returns the passed enum to test serialization and deserialization. + func echoAnotherNullableEnum(anotherEnum: NIAnotherEnum?) throws -> NIAnotherEnum? { + let error = NiTestsError() + let res = api!.echoAnotherNullableEnum( + anotherEnum: isNullish(anotherEnum) ? nil : NSNumber(value: anotherEnum!.rawValue), + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnotherEnum") as! NIAnotherEnum? + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + func noopAsync() async throws { + let error = NiTestsError() + await api!.noopAsync(error: error) + if error.code != nil { + throw error + } + } + + func throwFlutterErrorAsync() async throws -> Any? { + let error = NiTestsError() + let res = await api!.throwFlutterErrorAsync(error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Object") + } + + func echoAsyncNIAllTypes(everything: NIAllTypes) async throws -> NIAllTypes { + let error = NiTestsError() + let res = await api!.echoAsyncNIAllTypes( + everything: NIAllTypesBridge.fromSwift(everything)!, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllTypes") as! NIAllTypes + } + + func echoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?) async throws + -> NIAllNullableTypes? + { + let error = NiTestsError() + let res = await api!.echoAsyncNullableNIAllNullableTypes( + everything: NIAllNullableTypesBridge.fromSwift(everything), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllNullableTypes") + as! NIAllNullableTypes? + } + + func echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ) async throws -> NIAllNullableTypesWithoutRecursion? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursionBridge.fromSwift(everything), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAllNullableTypesWithoutRecursion") + as! NIAllNullableTypesWithoutRecursion? + } + + func echoAsyncBool(aBool: Bool) async throws -> Bool { + let error = NiTestsError() + let res = await api!.echoAsyncBool(aBool: NSNumber(value: aBool), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "bool") as! Bool + } + + func echoAsyncInt(anInt: Int64) async throws -> Int64 { + let error = NiTestsError() + let res = await api!.echoAsyncInt(anInt: NSNumber(value: anInt), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "int") as! Int64 + } + + func echoAsyncDouble(aDouble: Double) async throws -> Double { + let error = NiTestsError() + let res = await api!.echoAsyncDouble(aDouble: NSNumber(value: aDouble), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "double") as! Double + } + + func echoAsyncString(aString: String) async throws -> String { + let error = NiTestsError() + let res = await api!.echoAsyncString(aString: aString as NSString?, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "String") as! String + } + + func echoAsyncUint8List(list: [UInt8]) async throws -> [UInt8] { + let error = NiTestsError() + let res = await api!.echoAsyncUint8List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Uint8List") as! [UInt8] + } + + func echoAsyncInt32List(list: [Int32]) async throws -> [Int32] { + let error = NiTestsError() + let res = await api!.echoAsyncInt32List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int32List") as! [Int32] + } + + func echoAsyncInt64List(list: [Int64]) async throws -> [Int64] { + let error = NiTestsError() + let res = await api!.echoAsyncInt64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int64List") as! [Int64] + } + + func echoAsyncFloat64List(list: [Float64]) async throws -> [Float64] { + let error = NiTestsError() + let res = await api!.echoAsyncFloat64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Float64List") as! [Float64] + } + + func echoAsyncObject(anObject: Any) async throws -> Any { + let error = NiTestsError() + let res = await api!.echoAsyncObject( + anObject: _PigeonFfiCodec.writeValue(value: anObject, isObject: true) as? NSObject, + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Object")! + } + + func echoAsyncList(list: [Any?]) async throws -> [Any?] { + let error = NiTestsError() + let res = await api!.echoAsyncList( + list: _PigeonFfiCodec.writeValue(value: list) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [Any?] + } + + func echoAsyncEnumList(enumList: [NIAnEnum?]) async throws -> [NIAnEnum?] { + let error = NiTestsError() + let res = await api!.echoAsyncEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum?] + } + + func echoAsyncClassList(classList: [NIAllNullableTypes?]) async throws -> [NIAllNullableTypes?] { + let error = NiTestsError() + let res = await api!.echoAsyncClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes?] + } + + func echoAsyncNonNullEnumList(enumList: [NIAnEnum]) async throws -> [NIAnEnum] { + let error = NiTestsError() + let res = await api!.echoAsyncNonNullEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum] + } + + func echoAsyncNonNullClassList(classList: [NIAllNullableTypes]) async throws + -> [NIAllNullableTypes] + { + let error = NiTestsError() + let res = await api!.echoAsyncNonNullClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes] + } + + func echoAsyncMap(map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] { + let error = NiTestsError() + let res = await api!.echoAsyncMap( + map: _PigeonFfiCodec.writeValue(value: map) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [AnyHashable?: Any?] + } + + func echoAsyncStringMap(stringMap: [String?: String?]) async throws -> [String?: String?] { + let error = NiTestsError() + let res = await api!.echoAsyncStringMap( + stringMap: _PigeonFfiCodec.writeValue(value: stringMap) as? [NSObject: NSObject], error: error + ) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [String?: String?] + } + + func echoAsyncIntMap(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] { + let error = NiTestsError() + let res = await api!.echoAsyncIntMap( + intMap: _PigeonFfiCodec.writeValue(value: intMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [Int64?: Int64?] + } + + func echoAsyncEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]) async throws -> [NIAnEnum?: NIAnEnum?] { + let error = NiTestsError() + let res = await api!.echoAsyncEnumMap( + enumMap: _PigeonFfiCodec.writeValue(value: enumMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [NIAnEnum?: NIAnEnum?] + } + + func echoAsyncClassMap(classMap: [Int64?: NIAllNullableTypes?]) async throws -> [Int64?: + NIAllNullableTypes?] + { + let error = NiTestsError() + let res = await api!.echoAsyncClassMap( + classMap: _PigeonFfiCodec.writeValue(value: classMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [Int64?: NIAllNullableTypes?] + } + + func echoAsyncEnum(anEnum: NIAnEnum) async throws -> NIAnEnum { + let error = NiTestsError() + let res = await api!.echoAsyncEnum(anEnum: NSNumber(value: anEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnEnum") as! NIAnEnum + } + + func echoAnotherAsyncEnum(anotherEnum: NIAnotherEnum) async throws -> NIAnotherEnum { + let error = NiTestsError() + let res = await api!.echoAnotherAsyncEnum( + anotherEnum: NSNumber(value: anotherEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnotherEnum") as! NIAnotherEnum + } + + func echoAsyncNullableBool(aBool: Bool?) async throws -> Bool? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableBool( + aBool: isNullish(aBool) ? nil : NSNumber(value: aBool!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "bool") as! Bool? + } + + func echoAsyncNullableInt(anInt: Int64?) async throws -> Int64? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableInt( + anInt: isNullish(anInt) ? nil : NSNumber(value: anInt!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "int") as! Int64? + } + + func echoAsyncNullableDouble(aDouble: Double?) async throws -> Double? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableDouble( + aDouble: isNullish(aDouble) ? nil : NSNumber(value: aDouble!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "double") as! Double? + } + + func echoAsyncNullableString(aString: String?) async throws -> String? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableString(aString: aString as NSString?, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "String") as! String? + } + + func echoAsyncNullableUint8List(list: [UInt8]?) async throws -> [UInt8]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableUint8List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Uint8List") as! [UInt8]? + } + + func echoAsyncNullableInt32List(list: [Int32]?) async throws -> [Int32]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableInt32List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int32List") as! [Int32]? + } + + func echoAsyncNullableInt64List(list: [Int64]?) async throws -> [Int64]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableInt64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Int64List") as! [Int64]? + } + + func echoAsyncNullableFloat64List(list: [Float64]?) async throws -> [Float64]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableFloat64List( + list: isNullish(list) ? nil : NiTestsPigeonTypedData(list!), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Float64List") as! [Float64]? + } + + func echoAsyncNullableObject(anObject: Any?) async throws -> Any? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableObject( + anObject: _PigeonFfiCodec.writeValue(value: anObject, isObject: true) as? NSObject, + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Object") + } + + func echoAsyncNullableList(list: [Any?]?) async throws -> [Any?]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableList( + list: _PigeonFfiCodec.writeValue(value: list) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [Any?]? + } + + func echoAsyncNullableEnumList(enumList: [NIAnEnum?]?) async throws -> [NIAnEnum?]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum?]? + } + + func echoAsyncNullableClassList(classList: [NIAllNullableTypes?]?) async throws + -> [NIAllNullableTypes?]? + { + let error = NiTestsError() + let res = await api!.echoAsyncNullableClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes?]? + } + + func echoAsyncNullableNonNullEnumList(enumList: [NIAnEnum]?) async throws -> [NIAnEnum]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableNonNullEnumList( + enumList: _PigeonFfiCodec.writeValue(value: enumList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") as! [NIAnEnum]? + } + + func echoAsyncNullableNonNullClassList(classList: [NIAllNullableTypes]?) async throws + -> [NIAllNullableTypes]? + { + let error = NiTestsError() + let res = await api!.echoAsyncNullableNonNullClassList( + classList: _PigeonFfiCodec.writeValue(value: classList) as? [NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "List") + as! [NIAllNullableTypes]? + } + + func echoAsyncNullableMap(map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: Any?]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableMap( + map: _PigeonFfiCodec.writeValue(value: map) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [AnyHashable?: Any?]? + } + + func echoAsyncNullableStringMap(stringMap: [String?: String?]?) async throws -> [String?: + String?]? + { + let error = NiTestsError() + let res = await api!.echoAsyncNullableStringMap( + stringMap: _PigeonFfiCodec.writeValue(value: stringMap) as? [NSObject: NSObject], error: error + ) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [String?: String?]? + } + + func echoAsyncNullableIntMap(intMap: [Int64?: Int64?]?) async throws -> [Int64?: Int64?]? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableIntMap( + intMap: _PigeonFfiCodec.writeValue(value: intMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") as! [Int64?: Int64?]? + } + + func echoAsyncNullableEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]?) async throws -> [NIAnEnum?: + NIAnEnum?]? + { + let error = NiTestsError() + let res = await api!.echoAsyncNullableEnumMap( + enumMap: _PigeonFfiCodec.writeValue(value: enumMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [NIAnEnum?: NIAnEnum?]? + } + + func echoAsyncNullableClassMap(classMap: [Int64?: NIAllNullableTypes?]?) async throws -> [Int64?: + NIAllNullableTypes?]? + { + let error = NiTestsError() + let res = await api!.echoAsyncNullableClassMap( + classMap: _PigeonFfiCodec.writeValue(value: classMap) as? [NSObject: NSObject], error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res as NSObject?), type: "Map") + as! [Int64?: NIAllNullableTypes?]? + } + + func echoAsyncNullableEnum(anEnum: NIAnEnum?) async throws -> NIAnEnum? { + let error = NiTestsError() + let res = await api!.echoAsyncNullableEnum( + anEnum: isNullish(anEnum) ? nil : NSNumber(value: anEnum!.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnEnum") as! NIAnEnum? + } + + func echoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?) async throws -> NIAnotherEnum? { + let error = NiTestsError() + let res = await api!.echoAnotherAsyncNullableEnum( + anotherEnum: isNullish(anotherEnum) ? nil : NSNumber(value: anotherEnum!.rawValue), + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NIAnotherEnum") as! NIAnotherEnum? + } +} diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.gen.swift index 5eb4b81803ad..7bcd1cf392dc 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.gen.swift @@ -66,7 +66,15 @@ private func createConnectionError(withChannelName channelName: String) -> Proxy } private func isNullish(_ value: Any?) -> Bool { - return value is NSNull || value == nil + guard let innerValue = value else { + return true + } + + if case Optional.some(Optional.none) = value { + return true + } + + return innerValue is NSNull } private func nilOrValue(_ value: Any?) -> T? { diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift index 89d25d32f58e..3d96a5ab8aa1 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift @@ -50,6 +50,7 @@ public class TestPlugin: NSObject, FlutterPlugin, HostIntegrationCoreApi { proxyApiRegistrar = ProxyApiTestsPigeonProxyApiRegistrar( binaryMessenger: binaryMessenger, apiDelegate: ProxyApiDelegate()) proxyApiRegistrar!.setUp() + NIHostIntegrationCoreApiSetup.register(api: NITestsClass()) } public func detachFromEngine(for registrar: FlutterPluginRegistrar) { @@ -1240,976 +1241,3187 @@ public class TestPlugin: NSObject, FlutterPlugin, HostIntegrationCoreApi { } } -public class TestPluginWithSuffix: HostSmallApi { - public static func register(with registrar: FlutterPluginRegistrar, suffix: String) { - // Workaround for https://github.com/flutter/flutter/issues/118103. - #if os(iOS) - let messenger = registrar.messenger() - #else - let messenger = registrar.messenger - #endif - let plugin = TestPluginWithSuffix() - HostSmallApiSetup.setUp( - binaryMessenger: messenger, api: plugin, messageChannelSuffix: suffix) +class NITestsClass: NSObject, NIHostIntegrationCoreApi { + func callFlutterThrowError() throws -> Any? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.throwError() } - func echo(aString: String, completion: @escaping (Result) -> Void) { - completion(.success(aString)) + func callFlutterThrowErrorFromVoid() throws { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + try flutterApi.throwErrorFromVoid() } - func voidVoid(completion: @escaping (Result) -> Void) { - completion(.success(Void())) + func callFlutterThrowFlutterErrorAsync() async throws -> Any? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.throwFlutterErrorAsync() } -} + func callFlutterEchoNullable(_ aBool: Bool?) throws -> Bool? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableBool(aBool: aBool) + } -class SendInts: StreamIntsStreamHandler { - var timerActive = false - var timer: Timer? + func callFlutterEchoNullable(_ anInt: Int64?) throws -> Int64? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableInt(anInt: anInt) + } - override func onListen(withArguments arguments: Any?, sink: PigeonEventSink) { - var count: Int64 = 0 - if !timerActive { - timerActive = true - timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { _ in - DispatchQueue.main.async { - sink.success(count) - count += 1 - if count >= 5 { - sink.endOfStream() - self.timer?.invalidate() - } - } - } + func callFlutterEchoNullable(_ aDouble: Double?) throws -> Double? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) } + return try flutterApi.echoNullableDouble(aDouble: aDouble) } -} -class SendEvents: StreamEventsStreamHandler { - var timerActive = false - var timer: Timer? - var eventList: [PlatformEvent] = - [ - IntEvent(value: 1), - StringEvent(value: "string"), - BoolEvent(value: false), - DoubleEvent(value: 3.14), - ObjectsEvent(value: true), - EnumEvent(value: EventEnum.fortyTwo), - ClassEvent(value: EventAllNullableTypes(aNullableInt: 0)), - ] + func callFlutterEchoNullable(_ aString: String?) throws -> String? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableString(aString: aString) + } - override func onListen(withArguments arguments: Any?, sink: PigeonEventSink) { - var count = 0 - if !timerActive { - timerActive = true - timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { _ in - DispatchQueue.main.async { - if count >= self.eventList.count { - sink.endOfStream() - self.timer?.invalidate() - } else { - sink.success(self.eventList[count]) - count += 1 - } - } - } + func callFlutterEchoNullable(_ list: [UInt8]?) throws -> [UInt8]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) } + return try flutterApi.echoNullableUint8List(list: list) } -} -class SendConsistentNumbers: StreamConsistentNumbersStreamHandler { - let numberToSend: Int64 - init(numberToSend: Int64) { - self.numberToSend = numberToSend + func callFlutterEchoNullable(_ list: [Int32]?) throws -> [Int32]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableInt32List(list: list) } - var timerActive = false - var timer: Timer? - override func onListen(withArguments arguments: Any?, sink: PigeonEventSink) { - let numberThatWillBeSent: Int64 = numberToSend - var count: Int64 = 0 - if !timerActive { - timerActive = true - timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { _ in - DispatchQueue.main.async { - sink.success(numberThatWillBeSent) - count += 1 - if count >= 10 { - sink.endOfStream() - self.timer?.invalidate() - } - } - } + func callFlutterEchoNullable(_ list: [Int64]?) throws -> [Int64]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) } + return try flutterApi.echoNullableInt64List(list: list) } -} -class ProxyApiTestClassDelegate: PigeonApiDelegateProxyApiTestClass { - func pigeonDefaultConstructor( - pigeonApi: PigeonApiProxyApiTestClass, aBool: Bool, anInt: Int64, aDouble: Double, - aString: String, aUint8List: FlutterStandardTypedData, aList: [Any?], aMap: [String?: Any?], - anEnum: ProxyApiTestEnum, aProxyApi: ProxyApiSuperClass, aNullableBool: Bool?, - aNullableInt: Int64?, aNullableDouble: Double?, aNullableString: String?, - aNullableUint8List: FlutterStandardTypedData?, aNullableList: [Any?]?, - aNullableMap: [String?: Any?]?, aNullableEnum: ProxyApiTestEnum?, - aNullableProxyApi: ProxyApiSuperClass?, boolParam: Bool, intParam: Int64, - doubleParam: Double, stringParam: String, aUint8ListParam: FlutterStandardTypedData, - listParam: [Any?], mapParam: [String?: Any?], enumParam: ProxyApiTestEnum, - proxyApiParam: ProxyApiSuperClass, nullableBoolParam: Bool?, nullableIntParam: Int64?, - nullableDoubleParam: Double?, nullableStringParam: String?, - nullableUint8ListParam: FlutterStandardTypedData?, nullableListParam: [Any?]?, - nullableMapParam: [String?: Any?]?, nullableEnumParam: ProxyApiTestEnum?, - nullableProxyApiParam: ProxyApiSuperClass? - ) throws -> ProxyApiTestClass { - return ProxyApiTestClass() + func callFlutterEchoNullable(_ list: [Float64]?) throws -> [Float64]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableFloat64List(list: list) } - func namedConstructor( - pigeonApi: PigeonApiProxyApiTestClass, aBool: Bool, anInt: Int64, aDouble: Double, - aString: String, aUint8List: FlutterStandardTypedData, aList: [Any?], aMap: [String?: Any?], - anEnum: ProxyApiTestEnum, aProxyApi: ProxyApiSuperClass, aNullableBool: Bool?, - aNullableInt: Int64?, aNullableDouble: Double?, aNullableString: String?, - aNullableUint8List: FlutterStandardTypedData?, aNullableList: [Any?]?, - aNullableMap: [String?: Any?]?, aNullableEnum: ProxyApiTestEnum?, - aNullableProxyApi: ProxyApiSuperClass? - ) throws -> ProxyApiTestClass { - return ProxyApiTestClass() + func callFlutterEchoNullable(_ list: [Any?]?) throws -> [Any?]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableList(list: list) } - func attachedField(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> ProxyApiSuperClass + func callFlutterEchoNullable(enumList: [NIAnEnum?]?) throws -> [NIAnEnum?]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableEnumList(enumList: enumList) + } + + func callFlutterEchoNullable(classList: [NIAllNullableTypes?]?) throws + -> [NIAllNullableTypes?]? { - return ProxyApiSuperClass() + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableClassList(classList: classList) } - func staticAttachedField(pigeonApi: PigeonApiProxyApiTestClass) throws -> ProxyApiSuperClass { - return ProxyApiSuperClass() + func callFlutterEchoNullableNonNull(enumList: [NIAnEnum]?) throws -> [NIAnEnum]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableNonNullEnumList(enumList: enumList) } - func aBool(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> Bool + func callFlutterEchoNullableNonNull(classList: [NIAllNullableTypes]?) throws + -> [NIAllNullableTypes]? { - return true + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableNonNullClassList(classList: classList) } - func anInt(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> Int64 - { - return 0 + func callFlutterEchoNullable(_ map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableMap(map: map) } - func aDouble(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> Double - { - return 0.0 + func callFlutterEchoAsyncNullableFloat64List(list: [Float64]?) async throws -> [Float64]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableFloat64List(list: list) } - func aString(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> String - { - return "" + func callFlutterThrowFlutterError() throws -> Any? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.throwFlutterError() } - func aUint8List(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> FlutterStandardTypedData + func callFlutterEchoNullable(stringMap: [String?: String?]?) throws -> [String?: + String?]? { - return FlutterStandardTypedData(bytes: Data()) + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableStringMap(stringMap: stringMap) } - func aList(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> [Any?] - { - return [] + func callFlutterEchoNullable(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableIntMap(intMap: intMap) } - func aMap(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> [String?: Any?] + func callFlutterEchoNullable(enumMap: [NIAnEnum?: NIAnEnum?]?) throws -> [NIAnEnum?: + NIAnEnum?]? { - return [:] + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableEnumMap(enumMap: enumMap) } - func anEnum(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> ProxyApiTestEnum + func callFlutterEchoNullable(classMap: [Int64?: NIAllNullableTypes?]?) throws -> [Int64?: + NIAllNullableTypes?]? { - return ProxyApiTestEnum.one + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableClassMap(classMap: classMap) } - func aProxyApi(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> ProxyApiSuperClass + func callFlutterEchoNullableNonNull(stringMap: [String: String]?) throws -> [String: + String]? { - return ProxyApiSuperClass() + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableNonNullStringMap(stringMap: stringMap) } - func aNullableBool(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Bool? - { - return nil + func callFlutterEchoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableNonNullIntMap(intMap: intMap) } - func aNullableInt(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Int64? + func callFlutterEchoNullableNonNull(enumMap: [NIAnEnum: NIAnEnum]?) throws -> [NIAnEnum: + NIAnEnum]? { - return nil + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableNonNullEnumMap(enumMap: enumMap) } - func aNullableDouble(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Double? + func callFlutterEchoNullableNonNull(classMap: [Int64: NIAllNullableTypes]?) throws + -> [Int64: NIAllNullableTypes]? { - return nil + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableNonNullClassMap(classMap: classMap) } - func aNullableString(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> String? - { - return nil + func callFlutterEchoNullable(_ anEnum: NIAnEnum?) throws -> NIAnEnum? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNullableEnum(anEnum: anEnum) } - func aNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws -> FlutterStandardTypedData? { - return nil + func callFlutterEchoNullable(_ anotherEnum: NIAnotherEnum?) throws -> NIAnotherEnum? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoAnotherNullableEnum(anotherEnum: anotherEnum) } - func aNullableList(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> [Any?]? + func callFlutterEcho(_ everything: NIAllNullableTypes?) throws + -> NIAllNullableTypes? { - return nil + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNIAllNullableTypes(everything: everything) } - func aNullableMap(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> [String?: Any?]? - { - return nil + func callFlutterSendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypes { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.sendMultipleNullableTypes( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) } - func aNullableEnum(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> ProxyApiTestEnum? + func callFlutterEcho(_ everything: NIAllNullableTypesWithoutRecursion?) + throws -> NIAllNullableTypesWithoutRecursion? { - return nil + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNIAllNullableTypesWithoutRecursion(everything: everything) } - func aNullableProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws -> ProxyApiSuperClass? { - return nil + func callFlutterSendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypesWithoutRecursion { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.sendMultipleNullableTypesWithoutRecursion( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) } - func noop(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws { + func callFlutterEcho(_ list: [UInt8]) throws -> [UInt8] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoUint8List(list: list) } - func throwError(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Any? - { - throw ProxyApiTestsError(code: "code", message: "message", details: "details") + func callFlutterEcho(_ list: [Int32]) throws -> [Int32] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoInt32List(list: list) } - func throwErrorFromVoid( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws { - throw ProxyApiTestsError(code: "code", message: "message", details: "details") + func callFlutterEcho(_ list: [Int64]) throws -> [Int64] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoInt64List(list: list) } - func throwFlutterError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws -> Any? { - throw ProxyApiTestsError(code: "code", message: "message", details: "details") + func callFlutterEcho(_ list: [Float64]) throws -> [Float64] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoFloat64List(list: list) } - func echoInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64 - ) throws -> Int64 { - return anInt + func callFlutterEcho(_ list: [Any?]) throws -> [Any?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoList(list: list) } - func echoDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double - ) throws -> Double { - return aDouble + func callFlutterEcho(enumList: [NIAnEnum?]) throws -> [NIAnEnum?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoEnumList(enumList: enumList) } - func echoBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool - ) throws -> Bool { - return aBool + func callFlutterEcho(classList: [NIAllNullableTypes?]) throws -> [NIAllNullableTypes?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoClassList(classList: classList) } - func echoString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String - ) throws -> String { - return aString + func callFlutterEchoNonNull(enumList: [NIAnEnum]) throws -> [NIAnEnum] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNonNullEnumList(enumList: enumList) } - func echoUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData - ) throws -> FlutterStandardTypedData { - return aUint8List + func callFlutterEchoNonNull(classList: [NIAllNullableTypes]) throws + -> [NIAllNullableTypes] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNonNullClassList(classList: classList) } - func echoObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any - ) throws -> Any { - return anObject + func callFlutterEcho(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoMap(map: map) } - func echoList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?] - ) throws -> [Any?] { - return aList + func callFlutterEcho(stringMap: [String?: String?]) throws -> [String?: String?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoStringMap(stringMap: stringMap) } - func echoProxyApiList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aList: [ProxyApiTestClass] - ) throws -> [ProxyApiTestClass] { - return aList + func callFlutterEcho(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoIntMap(intMap: intMap) } - func echoMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?] - ) throws -> [String?: Any?] { - return aMap + func callFlutterEcho(enumMap: [NIAnEnum?: NIAnEnum?]) throws -> [NIAnEnum?: NIAnEnum?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoEnumMap(enumMap: enumMap) } - func echoProxyApiMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String: ProxyApiTestClass] - ) throws -> [String: ProxyApiTestClass] { - return aMap + func callFlutterEcho(classMap: [Int64?: NIAllNullableTypes?]) throws -> [Int64?: + NIAllNullableTypes?] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoClassMap(classMap: classMap) } - func echoEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum - ) throws -> ProxyApiTestEnum { - return anEnum + func callFlutterEchoNonNull(stringMap: [String: String]) throws -> [String: String] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNonNullStringMap(stringMap: stringMap) } - func echoProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aProxyApi: ProxyApiSuperClass - ) throws -> ProxyApiSuperClass { - return aProxyApi + func callFlutterEchoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNonNullIntMap(intMap: intMap) } - func echoNullableInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableInt: Int64? - ) throws -> Int64? { - return aNullableInt + func callFlutterEchoNonNull(enumMap: [NIAnEnum: NIAnEnum]) throws -> [NIAnEnum: NIAnEnum] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNonNullEnumMap(enumMap: enumMap) } - func echoNullableDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableDouble: Double? - ) throws -> Double? { - return aNullableDouble + func callFlutterEchoNonNull(classMap: [Int64: NIAllNullableTypes]) throws -> [Int64: + NIAllNullableTypes] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNonNullClassMap(classMap: classMap) } - func echoNullableBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableBool: Bool? - ) throws -> Bool? { - return aNullableBool + func callFlutterEcho(_ anEnum: NIAnEnum) throws -> NIAnEnum { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoEnum(anEnum: anEnum) } - func echoNullableString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableString: String? - ) throws -> String? { - return aNullableString + func callFlutterEcho(_ anotherEnum: NIAnotherEnum) throws -> NIAnotherEnum { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNIAnotherEnum(anotherEnum: anotherEnum) } - func echoNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableUint8List: FlutterStandardTypedData? - ) throws -> FlutterStandardTypedData? { - return aNullableUint8List + func callFlutterEcho(_ everything: NIAllTypes) throws -> NIAllTypes { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoNIAllTypes(everything: everything) } - func echoNullableObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableObject: Any? - ) throws -> Any? { - return aNullableObject + func callFlutterEcho(_ anInt: Int64) throws -> Int64 { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoInt(anInt: anInt) } - func echoNullableList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableList: [Any?]? - ) throws -> [Any?]? { - return aNullableList + func callFlutterEcho(_ aDouble: Double) throws -> Double { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoDouble(aDouble: aDouble) } - func echoNullableMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableMap: [String?: Any?]? - ) throws -> [String?: Any?]? { - return aNullableMap + func callFlutterEcho(_ aString: String) throws -> String { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoString(aString: aString) } - func echoNullableEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableEnum: ProxyApiTestEnum? - ) throws -> ProxyApiTestEnum? { - return aNullableEnum + func callFlutterNoop() throws { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + try flutterApi.noop() } - func echoNullableProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableProxyApi: ProxyApiSuperClass? - ) throws -> ProxyApiSuperClass? { - return aNullableProxyApi + func callFlutterEcho(_ aBool: Bool) throws -> Bool { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try flutterApi.echoBool(aBool: aBool) } - func noopAsync( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion(.success(Void())) + func echoAsync(_ aUint8List: [UInt8]) async throws -> [UInt8] { + return aUint8List } - func echoAsyncInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, - completion: @escaping (Result) -> Void - ) { - completion(.success(anInt)) + func echoAsync(_ aInt32List: [Int32]) async throws -> [Int32] { + return aInt32List } - func echoAsyncDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double, - completion: @escaping (Result) -> Void - ) { - completion(.success(aDouble)) + func echoAsync(_ aInt64List: [Int64]) async throws -> [Int64] { + return aInt64List } - func echoAsyncBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, - completion: @escaping (Result) -> Void - ) { - completion(.success(aBool)) + func echoAsync(_ aFloat64List: [Float64]) async throws -> [Float64] { + return aFloat64List } - func echoAsyncString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, - completion: @escaping (Result) -> Void - ) { - completion(.success(aString)) + func echoAsync(_ anObject: Any) async throws -> Any { + return anObject } - func echoAsyncUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData, - completion: @escaping (Result) -> Void - ) { - completion(.success(aUint8List)) + func echoAsync(_ list: [Any?]) async throws -> [Any?] { + return list } - func echoAsyncObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any, - completion: @escaping (Result) -> Void - ) { - completion(.success(anObject)) + func echoAsync(enumList: [NIAnEnum?]) async throws -> [NIAnEnum?] { + return enumList } - func echoAsyncList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], - completion: @escaping (Result<[Any?], Error>) -> Void - ) { - completion(.success(aList)) + func echoAsync(classList: [NIAllNullableTypes?]) async throws -> [NIAllNullableTypes?] { + return classList } - func echoAsyncMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void - ) { - completion(.success(aMap)) + func echoAsync(_ map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] { + return map } - func echoAsyncEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum, completion: @escaping (Result) -> Void - ) { - completion(.success(anEnum)) + func echoAsync(stringMap: [String?: String?]) async throws -> [String?: String?] { + return stringMap } - func throwAsyncError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion( - .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + func echoAsync(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] { + return intMap } - func throwAsyncErrorFromVoid( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion( - .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + func echoAsync(enumMap: [NIAnEnum?: NIAnEnum?]) async throws -> [NIAnEnum?: NIAnEnum?] { + return enumMap } - func throwAsyncFlutterError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion( - .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + func echoAsync(classMap: [Int64?: NIAllNullableTypes?]) async throws -> [Int64?: + NIAllNullableTypes?] + { + return classMap } - func echoAsyncNullableInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, - completion: @escaping (Result) -> Void - ) { - completion(.success(anInt)) + func echoAsync(_ anEnum: NIAnEnum) async throws -> NIAnEnum { + return anEnum } - func echoAsyncNullableDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aDouble)) + func echoAsync(_ anotherEnum: NIAnotherEnum) async throws -> NIAnotherEnum { + return anotherEnum } - func echoAsyncNullableBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aBool)) + func throwAsyncError() async throws -> Any? { + throw NiTestsError(code: "code", message: "message", details: "details") } - func echoAsyncNullableString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aString)) + func throwAsyncErrorFromVoid() async throws { + throw NiTestsError(code: "code", message: "message", details: "details") } - func echoAsyncNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aUint8List)) + func throwAsyncFlutterError() async throws -> Any? { + throw NiTestsError(code: "code", message: "message", details: "details") } - func echoAsyncNullableObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any?, - completion: @escaping (Result) -> Void - ) { - completion(.success(anObject)) + func echoAsync(_ everything: NIAllTypes) async throws -> NIAllTypes { + return everything } - func echoAsyncNullableList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?]?, - completion: @escaping (Result<[Any?]?, Error>) -> Void - ) { - completion(.success(aList)) + func echoAsync(_ everything: NIAllNullableTypes?) async throws + -> NIAllNullableTypes? + { + return everything } - func echoAsyncNullableMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void - ) { - completion(.success(aMap)) + func echoAsync(_ everything: NIAllNullableTypesWithoutRecursion?) + async throws -> NIAllNullableTypesWithoutRecursion? + { + return everything } - func echoAsyncNullableEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum?, completion: @escaping (Result) -> Void - ) { - completion(.success(anEnum)) + func echoAsyncNullable(_ anInt: Int64?) async throws -> Int64? { + return anInt } - func staticNoop(pigeonApi: PigeonApiProxyApiTestClass) throws { + func echoAsyncNullable(_ aDouble: Double?) async throws -> Double? { + return aDouble + } + func echoAsyncNullable(_ aBool: Bool?) async throws -> Bool? { + return aBool } - func echoStaticString(pigeonApi: PigeonApiProxyApiTestClass, aString: String) throws -> String { + func echoAsyncNullable(_ aString: String?) async throws -> String? { return aString } - func staticAsyncNoop( - pigeonApi: PigeonApiProxyApiTestClass, completion: @escaping (Result) -> Void - ) { - completion(.success(Void())) + func echoAsyncNullable(_ aUint8List: [UInt8]?) async throws -> [UInt8]? { + return aUint8List } - func callFlutterNoop( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterNoop(pigeonInstance: pigeonInstance) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ aInt32List: [Int32]?) async throws -> [Int32]? { + return aInt32List } - func callFlutterThrowError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterThrowError(pigeonInstance: pigeonInstance) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ aInt64List: [Int64]?) async throws -> [Int64]? { + return aInt64List } - func callFlutterThrowErrorFromVoid( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterThrowErrorFromVoid(pigeonInstance: pigeonInstance) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } + func callFlutterEchoAsyncFloat64List(list: [Float64]) async throws -> [Float64] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) } + return try await flutterApi.echoAsyncFloat64List(list: list) } - func callFlutterEchoBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoBool(pigeonInstance: pigeonInstance, aBool: aBool) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ aFloat64List: [Float64]?) async throws -> [Float64]? { + return aFloat64List } - func callFlutterEchoInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoInt(pigeonInstance: pigeonInstance, anInt: anInt) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ anObject: Any?) async throws -> Any? { + return anObject } - func callFlutterEchoDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoDouble(pigeonInstance: pigeonInstance, aDouble: aDouble) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ list: [Any?]?) async throws -> [Any?]? { + return list } - func callFlutterEchoString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoString(pigeonInstance: pigeonInstance, aString: aString) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(enumList: [NIAnEnum?]?) async throws -> [NIAnEnum?]? { + return enumList } - func callFlutterEchoUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoUint8List(pigeonInstance: pigeonInstance, aList: aUint8List) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(classList: [NIAllNullableTypes?]?) async throws + -> [NIAllNullableTypes?]? + { + return classList } - func callFlutterEchoList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], - completion: @escaping (Result<[Any?], Error>) -> Void - ) { - pigeonApi.flutterEchoList(pigeonInstance: pigeonInstance, aList: aList) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: Any?]? { + return map } - func callFlutterEchoProxyApiList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aList: [ProxyApiTestClass?], - completion: @escaping (Result<[ProxyApiTestClass?], Error>) -> Void - ) { - pigeonApi.flutterEchoProxyApiList(pigeonInstance: pigeonInstance, aList: aList) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(stringMap: [String?: String?]?) async throws -> [String?: + String?]? + { + return stringMap } - func callFlutterEchoMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void - ) { - pigeonApi.flutterEchoMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(intMap: [Int64?: Int64?]?) async throws -> [Int64?: Int64?]? { + return intMap } - func callFlutterEchoProxyApiMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: ProxyApiTestClass?], - completion: @escaping (Result<[String?: ProxyApiTestClass?], Error>) -> Void - ) { - pigeonApi.flutterEchoProxyApiMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(enumMap: [NIAnEnum?: NIAnEnum?]?) async throws -> [NIAnEnum?: + NIAnEnum?]? + { + return enumMap } - func callFlutterEchoEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum, completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoEnum(pigeonInstance: pigeonInstance, anEnum: anEnum) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(classMap: [Int64?: NIAllNullableTypes?]?) async throws -> [Int64?: + NIAllNullableTypes?]? + { + return classMap } - func callFlutterEchoProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aProxyApi: ProxyApiSuperClass, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoProxyApi(pigeonInstance: pigeonInstance, aProxyApi: aProxyApi) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ anEnum: NIAnEnum?) async throws -> NIAnEnum? { + return anEnum } - func callFlutterEchoNullableBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableBool(pigeonInstance: pigeonInstance, aBool: aBool) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsyncNullable(_ anotherEnum: NIAnotherEnum?) async throws -> NIAnotherEnum? { + return anotherEnum } - func callFlutterEchoNullableInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableInt(pigeonInstance: pigeonInstance, anInt: anInt) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsync(_ aDouble: Double) async throws -> Double { + return aDouble } - func callFlutterEchoNullableDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double?, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableDouble(pigeonInstance: pigeonInstance, aDouble: aDouble) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsync(_ aBool: Bool) async throws -> Bool { + return aBool } - func callFlutterEchoNullableString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String?, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableString(pigeonInstance: pigeonInstance, aString: aString) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsync(_ aString: String) async throws -> String { + return aString } - func callFlutterEchoNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData?, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableUint8List(pigeonInstance: pigeonInstance, aList: aUint8List) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func noopAsync() async throws { + return } - func callFlutterEchoNullableList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?]?, - completion: @escaping (Result<[Any?]?, Error>) -> Void - ) { - pigeonApi.flutterEchoNullableList(pigeonInstance: pigeonInstance, aList: aList) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoAsync(_ anInt: Int64) async throws -> Int64 { + return anInt } - func callFlutterEchoNullableMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void - ) { - pigeonApi.flutterEchoNullableMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoNullable(_ everything: NIAllNullableTypes?) throws -> NIAllNullableTypes? { + return everything } - func callFlutterEchoNullableEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum?, completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableEnum(pigeonInstance: pigeonInstance, anEnum: anEnum) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoNamedDefault(_ aString: String) throws -> String { + return aString } - func callFlutterEchoNullableProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aProxyApi: ProxyApiSuperClass?, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoNullableProxyApi(pigeonInstance: pigeonInstance, aProxyApi: aProxyApi) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoOptionalDefault(_ aDouble: Double) throws -> Double { + return aDouble } - func callFlutterNoopAsync( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterNoopAsync(pigeonInstance: pigeonInstance) { response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoRequired(_ anInt: Int64) throws -> Int64 { + return anInt } - func callFlutterEchoAsyncString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, - completion: @escaping (Result) -> Void - ) { - pigeonApi.flutterEchoAsyncString(pigeonInstance: pigeonInstance, aString: aString) { - response in - switch response { - case .success(let res): - completion(.success(res)) - case .failure(let error): - completion(.failure(error)) - } - } + func echoOptional(_ aNullableInt: Int64?) throws -> Int64? { + return aNullableInt } -} + func echoNamed(_ aNullableString: String?) throws -> String? { + return aNullableString + } -class ProxyApiDelegate: ProxyApiTestsPigeonProxyApiDelegate { - func pigeonApiProxyApiTestClass(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) - -> PigeonApiProxyApiTestClass + func throwError() throws -> Any? { + throw NiTestsError(code: "code", message: "message", details: "details") + } + + func throwErrorFromVoid() throws { + throw NiTestsError(code: "code", message: "message", details: "details") + } + + func throwFlutterError() throws -> Any? { + throw NiTestsError(code: "code", message: "message", details: "details") + } + + func echo(_ aUint8List: [UInt8]) throws -> [UInt8] { + return aUint8List + } + + func echo(_ aInt32List: [Int32]) throws -> [Int32] { + return aInt32List + } + + func echo(_ aInt64List: [Int64]) throws -> [Int64] { + return aInt64List + } + + func echo(_ aFloat64List: [Float64]) throws -> [Float64] { + return aFloat64List + } + + func echoNullable(_ aNullableUint8List: [UInt8]?) throws -> [UInt8]? { + return aNullableUint8List + } + + func echoNullable(_ aNullableInt32List: [Int32]?) throws -> [Int32]? { + return aNullableInt32List + } + + func echoNullable(_ aNullableInt64List: [Int64]?) throws -> [Int64]? { + return aNullableInt64List + } + + func echoNullable(_ aNullableFloat64List: [Float64]?) throws -> [Float64]? { + return aNullableFloat64List + } + + func echoNonNull(classMap: [Int64: NIAllNullableTypes]) throws -> [Int64: + NIAllNullableTypes] + { + return classMap + } + + func echo(classMap: [Int64?: NIAllNullableTypes?]) throws -> [Int64?: + NIAllNullableTypes?] + { + return classMap + } + + func echoNullableNonNull(classList: [NIAllNullableTypes]?) throws + -> [NIAllNullableTypes]? + { + return classList + } + + func echoNullable(classMap: [Int64?: NIAllNullableTypes?]?) throws + -> [Int64?: NIAllNullableTypes?]? + { + return classMap + } + + func echoNullableNonNull(classMap: [Int64: NIAllNullableTypes]?) throws + -> [Int64: NIAllNullableTypes]? + { + return classMap + } + + func echo(enumMap: [NIAnEnum?: NIAnEnum?]) throws -> [NIAnEnum?: NIAnEnum?] { + return enumMap + } + + func echoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] { + return intMap + } + + func echoNonNull(enumMap: [NIAnEnum: NIAnEnum]) throws -> [NIAnEnum: NIAnEnum] { + return enumMap + } + + func echoNullableNonNull(enumList: [NIAnEnum]?) throws -> [NIAnEnum]? { + return enumList + } + + func echoNullable(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? { + return intMap + } + + func echoNullable(enumMap: [NIAnEnum?: NIAnEnum?]?) throws -> [NIAnEnum?: NIAnEnum?]? { + return enumMap + } + + func echoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? { + return intMap + } + + func echoNullableNonNull(enumMap: [NIAnEnum: NIAnEnum]?) throws -> [NIAnEnum: NIAnEnum]? { + return enumMap + } + + func echo(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] { + return intMap + } + + func echoNonNull(enumList: [NIAnEnum]) throws -> [NIAnEnum] { + return enumList + } + + func echoNonNull(classList: [NIAllNullableTypes]) throws + -> [NIAllNullableTypes] + { + return classList + } + + func echoNonNull(stringMap: [String: String]) throws -> [String: String] { + return stringMap + } + + func sendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypes { + return NIAllNullableTypes( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) + } + + func echoNullable(enumList: [NIAnEnum?]?) throws -> [NIAnEnum?]? { + return enumList + } + + func echoNullable(classList: [NIAllNullableTypes?]?) throws + -> [NIAllNullableTypes?]? { + return classList + } + + func echoNullable(stringMap: [String?: String?]?) throws -> [String?: String?]? { + return stringMap + } + + func echoNullableNonNull(stringMap: [String: String]?) throws -> [String: String]? { + return stringMap + } + + func echo(enumList: [NIAnEnum?]) throws -> [NIAnEnum?] { + return enumList + } + + func echo(classList: [NIAllNullableTypes?]) throws + -> [NIAllNullableTypes?] + { + return classList + } + + func echo(stringMap: [String?: String?]) throws -> [String?: String?] { + return stringMap + } + + func echo(stringList: [String?]) throws -> [String?] { + return stringList + } + + func echo(intList: [Int64?]) throws -> [Int64?] { + return intList + } + + func echo(doubleList: [Double?]) throws -> [Double?] { + return doubleList + } + + func echo(boolList: [Bool?]) throws -> [Bool?] { + return boolList + } + + func extractNestedNullableString(from wrapper: NIAllClassesWrapper) throws -> String? { + return wrapper.allNullableTypes.aNullableString + } + + func createNestedObject(with nullableString: String?) throws -> NIAllClassesWrapper { + return NIAllClassesWrapper( + allNullableTypes: .init(aNullableString: nullableString), classList: [], + classMap: [:]) + } + + func echo(_ wrapper: NIAllClassesWrapper) throws -> NIAllClassesWrapper { + return wrapper + } + + func sendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NIAllNullableTypesWithoutRecursion { + return NIAllNullableTypesWithoutRecursion( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) + } + + func echoNullable(_ aNullableObject: Any?) throws -> Any? { + return aNullableObject + } + + func echoNullable(_ aNullableList: [Any?]?) throws -> [Any?]? { + return aNullableList + } + + func echoNullable(_ map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? { + return map + } + + func echoNullable(_ anEnum: NIAnEnum?) throws -> NIAnEnum? { + return anEnum + } + + func echoNullable(_ anotherEnum: NIAnotherEnum?) throws -> NIAnotherEnum? { + return anotherEnum + } + + func echoNullable(_ everything: NIAllNullableTypesWithoutRecursion?) throws + -> NIAllNullableTypesWithoutRecursion? + { + return everything + } + + func echoNullable(_ aNullableInt: Int64?) throws -> Int64? { + return aNullableInt + } + + func echoNullable(_ aNullableDouble: Double?) throws -> Double? { + return aNullableDouble + } + + func echoNullable(_ aNullableBool: Bool?) throws -> Bool? { + return aNullableBool + } + + func echoNullable(_ aNullableString: String?) throws -> String? { + return aNullableString + } + + func echo(_ anotherEnum: NIAnotherEnum) throws -> NIAnotherEnum { + return anotherEnum + } + + func echo(_ everything: NIAllTypes) throws -> NIAllTypes { + return everything + } + + func echo(_ list: [Any?]) throws -> [Any?] { + return list + } + + func echo(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { + return map + } + + func noop() throws { + return + } + + func echo(_ anInt: Int64) throws -> Int64 { + return anInt + } + + func echo(_ aDouble: Double) throws -> Double { + return aDouble + } + + func echo(_ aBool: Bool) throws -> Bool { + return aBool + } + + func echo(_ aString: String) throws -> String { + return aString + } + + func echo(_ anEnum: NIAnEnum) throws -> NIAnEnum { + return anEnum + } + func echo(_ anObject: Any) throws -> Any { + return anObject + } + + func callFlutterEchoAsyncNullableEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]?) async throws + -> [NIAnEnum?: NIAnEnum?]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableEnumMap(enumMap: enumMap) + } + + func callFlutterEchoAsyncNullableClassMap(classMap: [Int64?: NIAllNullableTypes?]?) async throws + -> [Int64?: NIAllNullableTypes?]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableClassMap(classMap: classMap) + } + + func callFlutterEchoAsyncNullableEnum(anEnum: NIAnEnum?) async throws -> NIAnEnum? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableEnum(anEnum: anEnum) + } + + func callFlutterEchoAnotherAsyncNullableEnum(anotherEnum: NIAnotherEnum?) async throws + -> NIAnotherEnum? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAnotherAsyncNullableEnum(anotherEnum: anotherEnum) + } + + func callFlutterNoopAsync() async throws { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + try await flutterApi.noopAsync() + } + + func callFlutterEchoAsyncString(aString: String) async throws -> String { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncString(aString: aString) + } + + func callFlutterEchoAsyncInt(anInt: Int64) async throws -> Int64 { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncInt(anInt: anInt) + } + + func callFlutterEchoAsyncNIAllTypes(everything: NIAllTypes) async throws -> NIAllTypes { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNIAllTypes(everything: everything) + } + + func callFlutterEchoAsyncNullableNIAllNullableTypes(everything: NIAllNullableTypes?) async throws + -> NIAllNullableTypes? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableNIAllNullableTypes(everything: everything) + } + + func callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: NIAllNullableTypesWithoutRecursion? + ) async throws -> NIAllNullableTypesWithoutRecursion? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableNIAllNullableTypesWithoutRecursion( + everything: everything) + } + + func callFlutterEchoAsyncBool(aBool: Bool) async throws -> Bool { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncBool(aBool: aBool) + } + + func callFlutterEchoAsyncDouble(aDouble: Double) async throws -> Double { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncDouble(aDouble: aDouble) + } + + func callFlutterEchoAsyncUint8List(list: [UInt8]) async throws -> [UInt8] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncUint8List(list: list) + } + + func callFlutterEchoAsyncInt32List(list: [Int32]) async throws -> [Int32] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncInt32List(list: list) + } + + func callFlutterEchoAsyncInt64List(list: [Int64]) async throws -> [Int64] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncInt64List(list: list) + } + + func callFlutterEchoAsyncObject(anObject: Any) async throws -> Any { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncObject(anObject: anObject) + } + + func callFlutterEchoAsyncList(list: [Any?]) async throws -> [Any?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncList(list: list) + } + + func callFlutterEchoAsyncEnumList(enumList: [NIAnEnum?]) async throws -> [NIAnEnum?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncClassList(classList: [NIAllNullableTypes?]) async throws + -> [NIAllNullableTypes?] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncClassList(classList: classList) + } + + func callFlutterEchoAsyncNonNullEnumList(enumList: [NIAnEnum]) async throws -> [NIAnEnum] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNonNullEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncNonNullClassList(classList: [NIAllNullableTypes]) async throws + -> [NIAllNullableTypes] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNonNullClassList(classList: classList) + } + + func callFlutterEchoAsyncMap(map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncMap(map: map) + } + + func callFlutterEchoAsyncStringMap(stringMap: [String?: String?]) async throws -> [String?: + String?] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncStringMap(stringMap: stringMap) + } + + func callFlutterEchoAsyncIntMap(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncIntMap(intMap: intMap) + } + + func callFlutterEchoAsyncEnumMap(enumMap: [NIAnEnum?: NIAnEnum?]) async throws -> [NIAnEnum?: + NIAnEnum?] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncEnumMap(enumMap: enumMap) + } + + func callFlutterEchoAsyncClassMap(classMap: [Int64?: NIAllNullableTypes?]) async throws + -> [Int64?: + NIAllNullableTypes?] + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncClassMap(classMap: classMap) + } + + func callFlutterEchoAsyncEnum(anEnum: NIAnEnum) async throws -> NIAnEnum { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncEnum(anEnum: anEnum) + } + + func callFlutterEchoAnotherAsyncEnum(anotherEnum: NIAnotherEnum) async throws -> NIAnotherEnum { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAnotherAsyncEnum(anotherEnum: anotherEnum) + } + + func callFlutterEchoAsyncNullableBool(aBool: Bool?) async throws -> Bool? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableBool(aBool: aBool) + } + + func callFlutterEchoAsyncNullableInt(anInt: Int64?) async throws -> Int64? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableInt(anInt: anInt) + } + + func callFlutterEchoAsyncNullableDouble(aDouble: Double?) async throws -> Double? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableDouble(aDouble: aDouble) + } + + func callFlutterEchoAsyncNullableString(aString: String?) async throws -> String? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableString(aString: aString) + } + + func callFlutterEchoAsyncNullableUint8List(list: [UInt8]?) async throws -> [UInt8]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableUint8List(list: list) + } + + func callFlutterEchoAsyncNullableInt32List(list: [Int32]?) async throws -> [Int32]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableInt32List(list: list) + } + + func callFlutterEchoAsyncNullableInt64List(list: [Int64]?) async throws -> [Int64]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableInt64List(list: list) + } + + func callFlutterEchoAsyncNullableObject(anObject: Any?) async throws -> Any? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableObject(anObject: anObject) + } + + func callFlutterEchoAsyncNullableList(list: [Any?]?) async throws -> [Any?]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableList(list: list) + } + + func callFlutterEchoAsyncNullableEnumList(enumList: [NIAnEnum?]?) async throws -> [NIAnEnum?]? { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncNullableClassList(classList: [NIAllNullableTypes?]?) async throws + -> [NIAllNullableTypes?]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableClassList(classList: classList) + } + + func callFlutterEchoAsyncNullableNonNullEnumList(enumList: [NIAnEnum]?) async throws + -> [NIAnEnum]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableNonNullEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncNullableNonNullClassList(classList: [NIAllNullableTypes]?) async throws + -> [NIAllNullableTypes]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableNonNullClassList(classList: classList) + } + + func callFlutterEchoAsyncNullableMap(map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: + Any?]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableMap(map: map) + } + + func callFlutterEchoAsyncNullableStringMap(stringMap: [String?: String?]?) async throws + -> [String?: + String?]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableStringMap(stringMap: stringMap) + } + + func callFlutterEchoAsyncNullableIntMap(intMap: [Int64?: Int64?]?) async throws -> [Int64?: + Int64?]? + { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + throw NiTestsError( + code: "not_registered", message: "NIFlutterIntegrationCoreApi not registered", details: nil) + } + return try await flutterApi.echoAsyncNullableIntMap(intMap: intMap) + } + + func defaultIsMainThread() throws -> Bool { + return Thread.isMainThread + } + + func callFlutterNoopOnBackgroundThread() async throws -> Bool { + return await withCheckedContinuation { continuation in + DispatchQueue.global(qos: .background).async { + Task { + do { + guard let flutterApi = NIFlutterIntegrationCoreApi.getInstance() else { + continuation.resume(returning: false) + return + } + try await flutterApi.noopAsync() + continuation.resume(returning: true) + } catch { + continuation.resume(returning: false) + } + } + } + } + } +} + +public class TestPluginWithSuffix: HostSmallApi { + public static func register(with registrar: FlutterPluginRegistrar, suffix: String) { + // Workaround for https://github.com/flutter/flutter/issues/118103. + #if os(iOS) + let messenger = registrar.messenger() + #else + let messenger = registrar.messenger + #endif + let plugin = TestPluginWithSuffix() + HostSmallApiSetup.setUp( + binaryMessenger: messenger, api: plugin, messageChannelSuffix: suffix) + } + + func echo(aString: String, completion: @escaping (Result) -> Void) { + completion(.success(aString)) + } + + func voidVoid(completion: @escaping (Result) -> Void) { + completion(.success(Void())) + } + +} + +class SendInts: StreamIntsStreamHandler { + var timerActive = false + var timer: Timer? + + override func onListen(withArguments arguments: Any?, sink: PigeonEventSink) { + var count: Int64 = 0 + if !timerActive { + timerActive = true + timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { _ in + DispatchQueue.main.async { + sink.success(count) + count += 1 + if count >= 5 { + sink.endOfStream() + self.timer?.invalidate() + } + } + } + } + } +} + +class SendEvents: StreamEventsStreamHandler { + var timerActive = false + var timer: Timer? + var eventList: [PlatformEvent] = + [ + IntEvent(value: 1), + StringEvent(value: "string"), + BoolEvent(value: false), + DoubleEvent(value: 3.14), + ObjectsEvent(value: true), + EnumEvent(value: EventEnum.fortyTwo), + ClassEvent(value: EventAllNullableTypes(aNullableInt: 0)), + ] + + override func onListen(withArguments arguments: Any?, sink: PigeonEventSink) { + var count = 0 + if !timerActive { + timerActive = true + timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { _ in + DispatchQueue.main.async { + if count >= self.eventList.count { + sink.endOfStream() + self.timer?.invalidate() + } else { + sink.success(self.eventList[count]) + count += 1 + } + } + } + } + } +} + +class SendConsistentNumbers: StreamConsistentNumbersStreamHandler { + let numberToSend: Int64 + init(numberToSend: Int64) { + self.numberToSend = numberToSend + } + var timerActive = false + var timer: Timer? + + override func onListen(withArguments arguments: Any?, sink: PigeonEventSink) { + let numberThatWillBeSent: Int64 = numberToSend + var count: Int64 = 0 + if !timerActive { + timerActive = true + timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true) { _ in + DispatchQueue.main.async { + sink.success(numberThatWillBeSent) + count += 1 + if count >= 10 { + sink.endOfStream() + self.timer?.invalidate() + } + } + } + } + } +} + +class ProxyApiTestClassDelegate: PigeonApiDelegateProxyApiTestClass { + func pigeonDefaultConstructor( + pigeonApi: PigeonApiProxyApiTestClass, aBool: Bool, anInt: Int64, aDouble: Double, + aString: String, aUint8List: FlutterStandardTypedData, aList: [Any?], aMap: [String?: Any?], + anEnum: ProxyApiTestEnum, aProxyApi: ProxyApiSuperClass, aNullableBool: Bool?, + aNullableInt: Int64?, aNullableDouble: Double?, aNullableString: String?, + aNullableUint8List: FlutterStandardTypedData?, aNullableList: [Any?]?, + aNullableMap: [String?: Any?]?, aNullableEnum: ProxyApiTestEnum?, + aNullableProxyApi: ProxyApiSuperClass?, boolParam: Bool, intParam: Int64, + doubleParam: Double, stringParam: String, aUint8ListParam: FlutterStandardTypedData, + listParam: [Any?], mapParam: [String?: Any?], enumParam: ProxyApiTestEnum, + proxyApiParam: ProxyApiSuperClass, nullableBoolParam: Bool?, nullableIntParam: Int64?, + nullableDoubleParam: Double?, nullableStringParam: String?, + nullableUint8ListParam: FlutterStandardTypedData?, nullableListParam: [Any?]?, + nullableMapParam: [String?: Any?]?, nullableEnumParam: ProxyApiTestEnum?, + nullableProxyApiParam: ProxyApiSuperClass? + ) throws -> ProxyApiTestClass { + return ProxyApiTestClass() + } + + func namedConstructor( + pigeonApi: PigeonApiProxyApiTestClass, aBool: Bool, anInt: Int64, aDouble: Double, + aString: String, aUint8List: FlutterStandardTypedData, aList: [Any?], aMap: [String?: Any?], + anEnum: ProxyApiTestEnum, aProxyApi: ProxyApiSuperClass, aNullableBool: Bool?, + aNullableInt: Int64?, aNullableDouble: Double?, aNullableString: String?, + aNullableUint8List: FlutterStandardTypedData?, aNullableList: [Any?]?, + aNullableMap: [String?: Any?]?, aNullableEnum: ProxyApiTestEnum?, + aNullableProxyApi: ProxyApiSuperClass? + ) throws -> ProxyApiTestClass { + return ProxyApiTestClass() + } + + func attachedField(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> ProxyApiSuperClass + { + return ProxyApiSuperClass() + } + + func staticAttachedField(pigeonApi: PigeonApiProxyApiTestClass) throws -> ProxyApiSuperClass { + return ProxyApiSuperClass() + } + + func aBool(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> Bool + { + return true + } + + func anInt(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> Int64 + { + return 0 + } + + func aDouble(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> Double + { + return 0.0 + } + + func aString(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> String + { + return "" + } + + func aUint8List(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> FlutterStandardTypedData + { + return FlutterStandardTypedData(bytes: Data()) + } + + func aList(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> [Any?] + { + return [] + } + + func aMap(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> [String?: Any?] + { + return [:] + } + + func anEnum(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws + -> ProxyApiTestEnum + { + return ProxyApiTestEnum.one + } + + func aProxyApi(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> ProxyApiSuperClass + { + return ProxyApiSuperClass() + } + + func aNullableBool(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> Bool? + { + return nil + } + + func aNullableInt(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> Int64? + { + return nil + } + + func aNullableDouble(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> Double? + { + return nil + } + + func aNullableString(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> String? + { + return nil + } + + func aNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass + ) throws -> FlutterStandardTypedData? { + return nil + } + + func aNullableList(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> [Any?]? + { + return nil + } + + func aNullableMap(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> [String?: Any?]? + { + return nil + } + + func aNullableEnum(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> ProxyApiTestEnum? + { + return nil + } + + func aNullableProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass + ) throws -> ProxyApiSuperClass? { + return nil + } + + func noop(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws { + } + + func throwError(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> Any? + { + throw ProxyApiTestsError(code: "code", message: "message", details: "details") + } + + func throwErrorFromVoid( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass + ) throws { + throw ProxyApiTestsError(code: "code", message: "message", details: "details") + } + + func throwFlutterError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass + ) throws -> Any? { + throw ProxyApiTestsError(code: "code", message: "message", details: "details") + } + + func echoInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64 + ) throws -> Int64 { + return anInt + } + + func echoDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double + ) throws -> Double { + return aDouble + } + + func echoBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool + ) throws -> Bool { + return aBool + } + + func echoString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String + ) throws -> String { + return aString + } + + func echoUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData + ) throws -> FlutterStandardTypedData { + return aUint8List + } + + func echoObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any + ) throws -> Any { + return anObject + } + + func echoList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?] + ) throws -> [Any?] { + return aList + } + + func echoProxyApiList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aList: [ProxyApiTestClass] + ) throws -> [ProxyApiTestClass] { + return aList + } + + func echoMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?] + ) throws -> [String?: Any?] { + return aMap + } + + func echoProxyApiMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String: ProxyApiTestClass] + ) throws -> [String: ProxyApiTestClass] { + return aMap + } + + func echoEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum + ) throws -> ProxyApiTestEnum { + return anEnum + } + + func echoProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aProxyApi: ProxyApiSuperClass + ) throws -> ProxyApiSuperClass { + return aProxyApi + } + + func echoNullableInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableInt: Int64? + ) throws -> Int64? { + return aNullableInt + } + + func echoNullableDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableDouble: Double? + ) throws -> Double? { + return aNullableDouble + } + + func echoNullableBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableBool: Bool? + ) throws -> Bool? { + return aNullableBool + } + + func echoNullableString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableString: String? + ) throws -> String? { + return aNullableString + } + + func echoNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableUint8List: FlutterStandardTypedData? + ) throws -> FlutterStandardTypedData? { + return aNullableUint8List + } + + func echoNullableObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableObject: Any? + ) throws -> Any? { + return aNullableObject + } + + func echoNullableList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableList: [Any?]? + ) throws -> [Any?]? { + return aNullableList + } + + func echoNullableMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableMap: [String?: Any?]? + ) throws -> [String?: Any?]? { + return aNullableMap + } + + func echoNullableEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableEnum: ProxyApiTestEnum? + ) throws -> ProxyApiTestEnum? { + return aNullableEnum + } + + func echoNullableProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableProxyApi: ProxyApiSuperClass? + ) throws -> ProxyApiSuperClass? { + return aNullableProxyApi + } + + func noopAsync( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion(.success(Void())) + } + + func echoAsyncInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, + completion: @escaping (Result) -> Void + ) { + completion(.success(anInt)) + } + + func echoAsyncDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double, + completion: @escaping (Result) -> Void + ) { + completion(.success(aDouble)) + } + + func echoAsyncBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, + completion: @escaping (Result) -> Void + ) { + completion(.success(aBool)) + } + + func echoAsyncString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, + completion: @escaping (Result) -> Void + ) { + completion(.success(aString)) + } + + func echoAsyncUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData, + completion: @escaping (Result) -> Void + ) { + completion(.success(aUint8List)) + } + + func echoAsyncObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any, + completion: @escaping (Result) -> Void + ) { + completion(.success(anObject)) + } + + func echoAsyncList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], + completion: @escaping (Result<[Any?], Error>) -> Void + ) { + completion(.success(aList)) + } + + func echoAsyncMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void + ) { + completion(.success(aMap)) + } + + func echoAsyncEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum, completion: @escaping (Result) -> Void + ) { + completion(.success(anEnum)) + } + + func throwAsyncError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion( + .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + } + + func throwAsyncErrorFromVoid( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion( + .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + } + + func throwAsyncFlutterError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion( + .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + } + + func echoAsyncNullableInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, + completion: @escaping (Result) -> Void + ) { + completion(.success(anInt)) + } + + func echoAsyncNullableDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aDouble)) + } + + func echoAsyncNullableBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aBool)) + } + + func echoAsyncNullableString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aString)) + } + + func echoAsyncNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aUint8List)) + } + + func echoAsyncNullableObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any?, + completion: @escaping (Result) -> Void + ) { + completion(.success(anObject)) + } + + func echoAsyncNullableList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?]?, + completion: @escaping (Result<[Any?]?, Error>) -> Void + ) { + completion(.success(aList)) + } + + func echoAsyncNullableMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void + ) { + completion(.success(aMap)) + } + + func echoAsyncNullableEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum?, completion: @escaping (Result) -> Void + ) { + completion(.success(anEnum)) + } + + func staticNoop(pigeonApi: PigeonApiProxyApiTestClass) throws { + + } + + func echoStaticString(pigeonApi: PigeonApiProxyApiTestClass, aString: String) throws -> String { + return aString + } + + func staticAsyncNoop( + pigeonApi: PigeonApiProxyApiTestClass, completion: @escaping (Result) -> Void + ) { + completion(.success(Void())) + } + + func callFlutterNoop( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterNoop(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterThrowError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterThrowError(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterThrowErrorFromVoid( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterThrowErrorFromVoid(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoBool(pigeonInstance: pigeonInstance, aBool: aBool) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoInt(pigeonInstance: pigeonInstance, anInt: anInt) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoDouble(pigeonInstance: pigeonInstance, aDouble: aDouble) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoString(pigeonInstance: pigeonInstance, aString: aString) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoUint8List(pigeonInstance: pigeonInstance, aList: aUint8List) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], + completion: @escaping (Result<[Any?], Error>) -> Void + ) { + pigeonApi.flutterEchoList(pigeonInstance: pigeonInstance, aList: aList) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoProxyApiList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aList: [ProxyApiTestClass?], + completion: @escaping (Result<[ProxyApiTestClass?], Error>) -> Void + ) { + pigeonApi.flutterEchoProxyApiList(pigeonInstance: pigeonInstance, aList: aList) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void + ) { + pigeonApi.flutterEchoMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoProxyApiMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: ProxyApiTestClass?], + completion: @escaping (Result<[String?: ProxyApiTestClass?], Error>) -> Void + ) { + pigeonApi.flutterEchoProxyApiMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum, completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoEnum(pigeonInstance: pigeonInstance, anEnum: anEnum) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aProxyApi: ProxyApiSuperClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoProxyApi(pigeonInstance: pigeonInstance, aProxyApi: aProxyApi) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableBool(pigeonInstance: pigeonInstance, aBool: aBool) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableInt(pigeonInstance: pigeonInstance, anInt: anInt) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableDouble(pigeonInstance: pigeonInstance, aDouble: aDouble) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableString(pigeonInstance: pigeonInstance, aString: aString) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableUint8List(pigeonInstance: pigeonInstance, aList: aUint8List) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?]?, + completion: @escaping (Result<[Any?]?, Error>) -> Void + ) { + pigeonApi.flutterEchoNullableList(pigeonInstance: pigeonInstance, aList: aList) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void + ) { + pigeonApi.flutterEchoNullableMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum?, completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableEnum(pigeonInstance: pigeonInstance, anEnum: anEnum) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aProxyApi: ProxyApiSuperClass?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableProxyApi(pigeonInstance: pigeonInstance, aProxyApi: aProxyApi) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterNoopAsync( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterNoopAsync(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoAsyncString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoAsyncString(pigeonInstance: pigeonInstance, aString: aString) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + +} + +class ProxyApiDelegate: ProxyApiTestsPigeonProxyApiDelegate { + func pigeonApiProxyApiTestClass(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) + -> PigeonApiProxyApiTestClass + { + class ProxyApiTestClassDelegate: PigeonApiDelegateProxyApiTestClass { + func pigeonDefaultConstructor( + pigeonApi: PigeonApiProxyApiTestClass, aBool: Bool, anInt: Int64, aDouble: Double, + aString: String, aUint8List: FlutterStandardTypedData, aList: [Any?], + aMap: [String?: Any?], + anEnum: ProxyApiTestEnum, aProxyApi: ProxyApiSuperClass, aNullableBool: Bool?, + aNullableInt: Int64?, aNullableDouble: Double?, aNullableString: String?, + aNullableUint8List: FlutterStandardTypedData?, aNullableList: [Any?]?, + aNullableMap: [String?: Any?]?, aNullableEnum: ProxyApiTestEnum?, + aNullableProxyApi: ProxyApiSuperClass?, boolParam: Bool, intParam: Int64, + doubleParam: Double, stringParam: String, aUint8ListParam: FlutterStandardTypedData, + listParam: [Any?], mapParam: [String?: Any?], enumParam: ProxyApiTestEnum, + proxyApiParam: ProxyApiSuperClass, nullableBoolParam: Bool?, nullableIntParam: Int64?, + nullableDoubleParam: Double?, nullableStringParam: String?, + nullableUint8ListParam: FlutterStandardTypedData?, nullableListParam: [Any?]?, + nullableMapParam: [String?: Any?]?, nullableEnumParam: ProxyApiTestEnum?, + nullableProxyApiParam: ProxyApiSuperClass? + ) throws -> ProxyApiTestClass { + return ProxyApiTestClass() + } + + func namedConstructor( + pigeonApi: PigeonApiProxyApiTestClass, aBool: Bool, anInt: Int64, aDouble: Double, + aString: String, aUint8List: FlutterStandardTypedData, aList: [Any?], aMap: [String?: Any?], + anEnum: ProxyApiTestEnum, aProxyApi: ProxyApiSuperClass, aNullableBool: Bool?, + aNullableInt: Int64?, aNullableDouble: Double?, aNullableString: String?, + aNullableUint8List: FlutterStandardTypedData?, aNullableList: [Any?]?, + aNullableMap: [String?: Any?]?, aNullableEnum: ProxyApiTestEnum?, + aNullableProxyApi: ProxyApiSuperClass? + ) throws -> ProxyApiTestClass { + return ProxyApiTestClass() + } + + func attachedField(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> ProxyApiSuperClass + { + return ProxyApiSuperClass() + } + + func staticAttachedField(pigeonApi: PigeonApiProxyApiTestClass) throws + -> ProxyApiSuperClass + { + return ProxyApiSuperClass() + } + + func noop(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws { + } + + func throwError(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) + throws -> Any? + { + throw ProxyApiTestsError(code: "code", message: "message", details: "details") + } + + func throwErrorFromVoid( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass + ) throws { + throw ProxyApiTestsError(code: "code", message: "message", details: "details") + } + + func throwFlutterError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass + ) throws -> Any? { + throw ProxyApiTestsError(code: "code", message: "message", details: "details") + } + + func echoInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64 + ) throws -> Int64 { + return anInt + } + + func echoDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aDouble: Double + ) throws -> Double { + return aDouble + } + + func echoBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool + ) throws -> Bool { + return aBool + } + + func echoString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aString: String + ) throws -> String { + return aString + } + + func echoUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData + ) throws -> FlutterStandardTypedData { + return aUint8List + } + + func echoObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any + ) throws -> Any { + return anObject + } + + func echoList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?] + ) throws -> [Any?] { + return aList + } + + func echoProxyApiList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aList: [ProxyApiTestClass] + ) throws -> [ProxyApiTestClass] { + return aList + } + + func echoMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?] + ) throws -> [String?: Any?] { + return aMap + } + + func echoProxyApiMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String: ProxyApiTestClass] + ) throws -> [String: ProxyApiTestClass] { + return aMap + } + + func echoEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum + ) throws -> ProxyApiTestEnum { + return anEnum + } + + func echoProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aProxyApi: ProxyApiSuperClass + ) throws -> ProxyApiSuperClass { + return aProxyApi + } + + func echoNullableInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableInt: Int64? + ) throws -> Int64? { + return aNullableInt + } + + func echoNullableDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableDouble: Double? + ) throws -> Double? { + return aNullableDouble + } + + func echoNullableBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableBool: Bool? + ) throws -> Bool? { + return aNullableBool + } + + func echoNullableString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableString: String? + ) throws -> String? { + return aNullableString + } + + func echoNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableUint8List: FlutterStandardTypedData? + ) throws -> FlutterStandardTypedData? { + return aNullableUint8List + } + + func echoNullableObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableObject: Any? + ) throws -> Any? { + return aNullableObject + } + + func echoNullableList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableList: [Any?]? + ) throws -> [Any?]? { + return aNullableList + } + + func echoNullableMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableMap: [String?: Any?]? + ) throws -> [String?: Any?]? { + return aNullableMap + } + + func echoNullableEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableEnum: ProxyApiTestEnum? + ) throws -> ProxyApiTestEnum? { + return aNullableEnum + } + + func echoNullableProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aNullableProxyApi: ProxyApiSuperClass? + ) throws -> ProxyApiSuperClass? { + return aNullableProxyApi + } + + func noopAsync( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion(.success(Void())) + } + + func echoAsyncInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, + completion: @escaping (Result) -> Void + ) { + completion(.success(anInt)) + } + + func echoAsyncDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aDouble: Double, + completion: @escaping (Result) -> Void + ) { + completion(.success(aDouble)) + } + + func echoAsyncBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, + completion: @escaping (Result) -> Void + ) { + completion(.success(aBool)) + } + + func echoAsyncString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aString: String, + completion: @escaping (Result) -> Void + ) { + completion(.success(aString)) + } + + func echoAsyncUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData, + completion: @escaping (Result) -> Void + ) { + completion(.success(aUint8List)) + } + + func echoAsyncObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any, + completion: @escaping (Result) -> Void + ) { + completion(.success(anObject)) + } + + func echoAsyncList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], + completion: @escaping (Result<[Any?], Error>) -> Void + ) { + completion(.success(aList)) + } + + func echoAsyncMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void + ) { + completion(.success(aMap)) + } + + func echoAsyncEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum, + completion: @escaping (Result) -> Void + ) { + completion(.success(anEnum)) + } + + func throwAsyncError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion( + .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + } + + func throwAsyncErrorFromVoid( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion( + .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + } + + func throwAsyncFlutterError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion( + .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + } + + func echoAsyncNullableInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, + completion: @escaping (Result) -> Void + ) { + completion(.success(anInt)) + } + + func echoAsyncNullableDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aDouble: Double?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aDouble)) + } + + func echoAsyncNullableBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aBool)) + } + + func echoAsyncNullableString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aString: String?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aString)) + } + + func echoAsyncNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData?, + completion: @escaping (Result) -> Void + ) { + completion(.success(aUint8List)) + } + + func echoAsyncNullableObject( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anObject: Any?, + completion: @escaping (Result) -> Void + ) { + completion(.success(anObject)) + } + + func echoAsyncNullableList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aList: [Any?]?, + completion: @escaping (Result<[Any?]?, Error>) -> Void + ) { + completion(.success(aList)) + } + + func echoAsyncNullableMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void + ) { + completion(.success(aMap)) + } + + func echoAsyncNullableEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum?, + completion: @escaping (Result) -> Void + ) { + completion(.success(anEnum)) + } + + func staticNoop(pigeonApi: PigeonApiProxyApiTestClass) throws { + + } + + func echoStaticString(pigeonApi: PigeonApiProxyApiTestClass, aString: String) throws + -> String + { + return aString + } + + func staticAsyncNoop( + pigeonApi: PigeonApiProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + completion(.success(Void())) + } + + func callFlutterNoop( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterNoop(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterThrowError( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterThrowError(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterThrowErrorFromVoid( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterThrowErrorFromVoid(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoBool(pigeonInstance: pigeonInstance, aBool: aBool) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoInt(pigeonInstance: pigeonInstance, anInt: anInt) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aDouble: Double, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoDouble(pigeonInstance: pigeonInstance, aDouble: aDouble) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aString: String, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoString(pigeonInstance: pigeonInstance, aString: aString) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoUint8List(pigeonInstance: pigeonInstance, aList: aUint8List) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], + completion: @escaping (Result<[Any?], Error>) -> Void + ) { + pigeonApi.flutterEchoList(pigeonInstance: pigeonInstance, aList: aList) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoProxyApiList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aList: [ProxyApiTestClass?], + completion: @escaping (Result<[ProxyApiTestClass?], Error>) -> Void + ) { + pigeonApi.flutterEchoProxyApiList(pigeonInstance: pigeonInstance, aList: aList) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void + ) { + pigeonApi.flutterEchoMap(pigeonInstance: pigeonInstance, aMap: aMap) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoProxyApiMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: ProxyApiTestClass?], + completion: @escaping (Result<[String?: ProxyApiTestClass?], Error>) -> Void + ) { + pigeonApi.flutterEchoProxyApiMap(pigeonInstance: pigeonInstance, aMap: aMap) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoEnum(pigeonInstance: pigeonInstance, anEnum: anEnum) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aProxyApi: ProxyApiSuperClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoProxyApi(pigeonInstance: pigeonInstance, aProxyApi: aProxyApi) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableBool( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableBool(pigeonInstance: pigeonInstance, aBool: aBool) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableInt( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableInt(pigeonInstance: pigeonInstance, anInt: anInt) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableDouble( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aDouble: Double?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableDouble(pigeonInstance: pigeonInstance, aDouble: aDouble) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aString: String?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableString(pigeonInstance: pigeonInstance, aString: aString) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableUint8List( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aUint8List: FlutterStandardTypedData?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableUint8List( + pigeonInstance: pigeonInstance, aList: aUint8List + ) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableList( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aList: [Any?]?, + completion: @escaping (Result<[Any?]?, Error>) -> Void + ) { + pigeonApi.flutterEchoNullableList(pigeonInstance: pigeonInstance, aList: aList) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableMap( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void + ) { + pigeonApi.flutterEchoNullableMap(pigeonInstance: pigeonInstance, aMap: aMap) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableEnum( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + anEnum: ProxyApiTestEnum?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableEnum(pigeonInstance: pigeonInstance, anEnum: anEnum) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoNullableProxyApi( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aProxyApi: ProxyApiSuperClass?, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoNullableProxyApi( + pigeonInstance: pigeonInstance, aProxyApi: aProxyApi + ) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterNoopAsync( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterNoopAsync(pigeonInstance: pigeonInstance) { response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + func callFlutterEchoAsyncString( + pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, + aString: String, + completion: @escaping (Result) -> Void + ) { + pigeonApi.flutterEchoAsyncString(pigeonInstance: pigeonInstance, aString: aString) { + response in + switch response { + case .success(let res): + completion(.success(res)) + case .failure(let error): + completion(.failure(error)) + } + } + } + + } return PigeonApiProxyApiTestClass( pigeonRegistrar: registrar, delegate: ProxyApiTestClassDelegate()) } diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.m b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.m new file mode 100644 index 000000000000..f5b9c8f4ab1e --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.m @@ -0,0 +1,225 @@ +#import +#import +#include +#import "test_plugin.h" + +#if !__has_feature(objc_arc) +#error "This file must be compiled with ARC enabled" +#endif + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" + +typedef struct { + int64_t version; + void *(*newWaiter)(void); + void (*awaitWaiter)(void *); + void *(*currentIsolate)(void); + void (*enterIsolate)(void *); + void (*exitIsolate)(void); + int64_t (*getMainPortId)(void); + bool (*getCurrentThreadOwnsIsolate)(int64_t); +} DOBJC_Context; + +id objc_retainBlock(id); + +#define BLOCKING_BLOCK_IMPL(ctx, BLOCK_SIG, INVOKE_DIRECT, INVOKE_LISTENER) \ + assert(ctx->version >= 1); \ + void *targetIsolate = ctx->currentIsolate(); \ + int64_t targetPort = ctx->getMainPortId == NULL ? 0 : ctx->getMainPortId(); \ + return BLOCK_SIG { \ + void *currentIsolate = ctx->currentIsolate(); \ + bool mayEnterIsolate = currentIsolate == NULL && ctx->getCurrentThreadOwnsIsolate != NULL && \ + ctx->getCurrentThreadOwnsIsolate(targetPort); \ + if (currentIsolate == targetIsolate || mayEnterIsolate) { \ + if (mayEnterIsolate) { \ + ctx->enterIsolate(targetIsolate); \ + } \ + INVOKE_DIRECT; \ + if (mayEnterIsolate) { \ + ctx->exitIsolate(); \ + } \ + } else { \ + void *waiter = ctx->newWaiter(); \ + INVOKE_LISTENER; \ + ctx->awaitWaiter(waiter); \ + } \ + }; + +Protocol *_umaz4x_NIFlutterIntegrationCoreApiBridge(void) { + return @protocol(NIFlutterIntegrationCoreApiBridge); +} + +typedef id (^_ProtocolTrampoline)(void *sel, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) id +_umaz4x_protocolTrampoline_zi5eed(id target, void *sel, id arg1, id arg2) { + return ((_ProtocolTrampoline)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); +} + +typedef id (^_ProtocolTrampoline_1)(void *sel, id arg1, id arg2, id arg3, id arg4); +__attribute__((visibility("default"))) __attribute__((used)) id +_umaz4x_protocolTrampoline_qfyidt(id target, void *sel, id arg1, id arg2, id arg3, id arg4) { + return ((_ProtocolTrampoline_1)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3, arg4); +} + +typedef id (^_ProtocolTrampoline_2)(void *sel, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) id +_umaz4x_protocolTrampoline_xr62hr(id target, void *sel, id arg1) { + return ((_ProtocolTrampoline_2)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); +} + +typedef void (^_ListenerTrampoline)(void); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline +_umaz4x_wrapListenerBlock_1pl9qdv(_ListenerTrampoline block) NS_RETURNS_RETAINED { + return ^void() { + objc_retainBlock(block); + block(); + }; +} + +typedef void (^_BlockingTrampoline)(void *waiter); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline +_umaz4x_wrapBlockingBlock_1pl9qdv(_BlockingTrampoline block, _BlockingTrampoline listenerBlock, + DOBJC_Context *ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL( + ctx, ^void(), + { + objc_retainBlock(block); + block(nil); + }, + { + objc_retainBlock(listenerBlock); + listenerBlock(waiter); + }); +} + +typedef void (^_ListenerTrampoline_1)(id arg0); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_1 +_umaz4x_wrapListenerBlock_xtuoz7(_ListenerTrampoline_1 block) NS_RETURNS_RETAINED { + return ^void(id arg0) { + objc_retainBlock(block); + block((__bridge id)(__bridge_retained void *)(arg0)); + }; +} + +typedef void (^_BlockingTrampoline_1)(void *waiter, id arg0); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_1 +_umaz4x_wrapBlockingBlock_xtuoz7(_BlockingTrampoline_1 block, _BlockingTrampoline_1 listenerBlock, + DOBJC_Context *ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL( + ctx, ^void(id arg0), + { + objc_retainBlock(block); + block(nil, (__bridge id)(__bridge_retained void *)(arg0)); + }, + { + objc_retainBlock(listenerBlock); + listenerBlock(waiter, (__bridge id)(__bridge_retained void *)(arg0)); + }); +} + +typedef void (^_ListenerTrampoline_2)(void *arg0, id arg1, id arg2, id arg3); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_2 +_umaz4x_wrapListenerBlock_bklti2(_ListenerTrampoline_2 block) NS_RETURNS_RETAINED { + return ^void(void *arg0, id arg1, id arg2, id arg3) { + objc_retainBlock(block); + block(arg0, (__bridge id)(__bridge_retained void *)(arg1), + (__bridge id)(__bridge_retained void *)(arg2), objc_retainBlock(arg3)); + }; +} + +typedef void (^_BlockingTrampoline_2)(void *waiter, void *arg0, id arg1, id arg2, id arg3); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_2 +_umaz4x_wrapBlockingBlock_bklti2(_BlockingTrampoline_2 block, _BlockingTrampoline_2 listenerBlock, + DOBJC_Context *ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL( + ctx, ^void(void *arg0, id arg1, id arg2, id arg3), + { + objc_retainBlock(block); + block(nil, arg0, (__bridge id)(__bridge_retained void *)(arg1), + (__bridge id)(__bridge_retained void *)(arg2), objc_retainBlock(arg3)); + }, + { + objc_retainBlock(listenerBlock); + listenerBlock(waiter, arg0, (__bridge id)(__bridge_retained void *)(arg1), + (__bridge id)(__bridge_retained void *)(arg2), objc_retainBlock(arg3)); + }); +} + +typedef void (^_ProtocolTrampoline_3)(void *sel, id arg1, id arg2, id arg3); +__attribute__((visibility("default"))) __attribute__((used)) void _umaz4x_protocolTrampoline_bklti2( + id target, void *sel, id arg1, id arg2, id arg3) { + return ((_ProtocolTrampoline_3)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3); +} + +typedef void (^_ListenerTrampoline_3)(void *arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_3 +_umaz4x_wrapListenerBlock_18v1jvf(_ListenerTrampoline_3 block) NS_RETURNS_RETAINED { + return ^void(void *arg0, id arg1) { + objc_retainBlock(block); + block(arg0, (__bridge id)(__bridge_retained void *)(arg1)); + }; +} + +typedef void (^_BlockingTrampoline_3)(void *waiter, void *arg0, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_3 +_umaz4x_wrapBlockingBlock_18v1jvf(_BlockingTrampoline_3 block, _BlockingTrampoline_3 listenerBlock, + DOBJC_Context *ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL( + ctx, ^void(void *arg0, id arg1), + { + objc_retainBlock(block); + block(nil, arg0, (__bridge id)(__bridge_retained void *)(arg1)); + }, + { + objc_retainBlock(listenerBlock); + listenerBlock(waiter, arg0, (__bridge id)(__bridge_retained void *)(arg1)); + }); +} + +typedef void (^_ProtocolTrampoline_4)(void *sel, id arg1); +__attribute__((visibility("default"))) __attribute__((used)) void +_umaz4x_protocolTrampoline_18v1jvf(id target, void *sel, id arg1) { + return ((_ProtocolTrampoline_4)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); +} + +typedef void (^_ListenerTrampoline_4)(void *arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_4 +_umaz4x_wrapListenerBlock_jk1ljc(_ListenerTrampoline_4 block) NS_RETURNS_RETAINED { + return ^void(void *arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(arg0, (__bridge id)(__bridge_retained void *)(arg1), objc_retainBlock(arg2)); + }; +} + +typedef void (^_BlockingTrampoline_4)(void *waiter, void *arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline_4 +_umaz4x_wrapBlockingBlock_jk1ljc(_BlockingTrampoline_4 block, _BlockingTrampoline_4 listenerBlock, + DOBJC_Context *ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL( + ctx, ^void(void *arg0, id arg1, id arg2), + { + objc_retainBlock(block); + block(nil, arg0, (__bridge id)(__bridge_retained void *)(arg1), objc_retainBlock(arg2)); + }, + { + objc_retainBlock(listenerBlock); + listenerBlock(waiter, arg0, (__bridge id)(__bridge_retained void *)(arg1), + objc_retainBlock(arg2)); + }); +} + +typedef void (^_ProtocolTrampoline_5)(void *sel, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) void _umaz4x_protocolTrampoline_jk1ljc( + id target, void *sel, id arg1, id arg2) { + return ((_ProtocolTrampoline_5)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); +} +#undef BLOCKING_BLOCK_IMPL + +#pragma clang diagnostic pop diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.o b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.o new file mode 100644 index 000000000000..5831ed2fb33b Binary files /dev/null and b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.o differ diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/test_plugin.h b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/test_plugin.h new file mode 100644 index 000000000000..7089c4e637d5 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/test_plugin.h @@ -0,0 +1,2725 @@ +// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 +// clang-1700.0.13.5) +#ifndef TEST_PLUGIN_SWIFT_H +#define TEST_PLUGIN_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +#define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +#define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +#define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +#define __has_warning(x) 0 +#endif + +#if __has_include() +#include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) +#include +#endif +#if defined(__cplusplus) +#include + +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#endif +#if defined(__cplusplus) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module" +#if defined(__arm64e__) && __has_include() +#include +#else +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-macro-identifier" +#ifndef __ptrauth_swift_value_witness_function_pointer +#define __ptrauth_swift_value_witness_function_pointer(x) +#endif +#ifndef __ptrauth_swift_class_method_pointer +#define __ptrauth_swift_class_method_pointer(x) +#endif +#pragma clang diagnostic pop +#endif +#pragma clang diagnostic pop +#endif + +#if !defined(SWIFT_TYPEDEFS) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) +typedef unsigned char char8_t; +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +#define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif +#endif +#if !defined(SWIFT_RUNTIME_NAME) +#if __has_attribute(objc_runtime_name) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +#define SWIFT_RUNTIME_NAME(X) +#endif +#endif +#if !defined(SWIFT_COMPILE_NAME) +#if __has_attribute(swift_name) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +#define SWIFT_COMPILE_NAME(X) +#endif +#endif +#if !defined(SWIFT_METHOD_FAMILY) +#if __has_attribute(objc_method_family) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +#define SWIFT_METHOD_FAMILY(X) +#endif +#endif +#if !defined(SWIFT_NOESCAPE) +#if __has_attribute(noescape) +#define SWIFT_NOESCAPE __attribute__((noescape)) +#else +#define SWIFT_NOESCAPE +#endif +#endif +#if !defined(SWIFT_RELEASES_ARGUMENT) +#if __has_attribute(ns_consumed) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +#define SWIFT_RELEASES_ARGUMENT +#endif +#endif +#if !defined(SWIFT_WARN_UNUSED_RESULT) +#if __has_attribute(warn_unused_result) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +#define SWIFT_WARN_UNUSED_RESULT +#endif +#endif +#if !defined(SWIFT_NORETURN) +#if __has_attribute(noreturn) +#define SWIFT_NORETURN __attribute__((noreturn)) +#else +#define SWIFT_NORETURN +#endif +#endif +#if !defined(SWIFT_CLASS_EXTRA) +#define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +#define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +#define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif +#endif +#if !defined(SWIFT_PROTOCOL) +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_EXTENSION) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif +#if !defined(OBJC_DESIGNATED_INITIALIZER) +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +#if __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif +#endif +#if !defined(SWIFT_ENUM) +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +#define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if !defined(SWIFT_DEPRECATED_OBJC) +#if __has_feature(attribute_diagnose_if_objc) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) +#else +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#endif +#if defined(__OBJC__) +#if !defined(IBSegueAction) +#define IBSegueAction +#endif +#endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif +#if !defined(SWIFT_CALL) +#define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if !defined(SWIFT_INDIRECT_RESULT) +#define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) +#endif +#if !defined(SWIFT_CONTEXT) +#define SWIFT_CONTEXT __attribute__((swift_context)) +#endif +#if !defined(SWIFT_ERROR_RESULT) +#define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) +#endif +#if defined(__cplusplus) +#define SWIFT_NOEXCEPT noexcept +#else +#define SWIFT_NOEXCEPT +#endif +#if !defined(SWIFT_C_INLINE_THUNK) +#if __has_attribute(always_inline) +#if __has_attribute(nodebug) +#define SWIFT_C_INLINE_THUNK \ + inline __attribute__((always_inline)) __attribute__((nodebug)) +#else +#define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) +#endif +#else +#define SWIFT_C_INLINE_THUNK inline +#endif +#endif +#if defined(_WIN32) +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +#define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) +#endif +#else +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +#define SWIFT_IMPORT_STDLIB_SYMBOL +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(objc_modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#endif +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" +#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" + +#if __has_attribute(external_source_symbol) +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol(language = "Swift", \ + defined_in = "test_plugin", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +@class NIAllNullableTypesBridge; +@class NIAllNullableTypesWithoutRecursionBridge; +@class NIAllTypesBridge; +/// A class for testing nested class handling. +/// This is needed to test nested nullable and non-nullable classes, +/// NIAllNullableTypes is non-nullable here as it is easier to +/// instantiate than NIAllTypes when testing doesn’t require both +/// (ie. testing null classes). Generated bridge class from Pigeon that moves +/// data from Swift to Objective-C. +SWIFT_CLASS("_TtC11test_plugin25NIAllClassesWrapperBridge") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NIAllClassesWrapperBridge : NSObject +- (nonnull instancetype) + initWithAllNullableTypes: + (NIAllNullableTypesBridge* _Nonnull)allNullableTypes + allNullableTypesWithoutRecursion: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + allNullableTypesWithoutRecursion + allTypes:(NIAllTypesBridge* _Nullable)allTypes + classList:(NSArray* _Nonnull)classList + nullableClassList: + (NSArray* _Nullable)nullableClassList + classMap:(NSDictionary, + NSObject*>* _Nonnull)classMap + nullableClassMap: + (NSDictionary, NSObject*>* _Nullable) + nullableClassMap OBJC_DESIGNATED_INITIALIZER; +@property(nonatomic, strong) + NIAllNullableTypesBridge* _Nonnull allNullableTypes; +@property(nonatomic, strong) + NIAllNullableTypesWithoutRecursionBridge* _Nullable allNullableTypesWithoutRecursion; +@property(nonatomic, strong) NIAllTypesBridge* _Nullable allTypes; +@property(nonatomic, copy) NSArray* _Nonnull classList; +@property(nonatomic, copy) NSArray* _Nullable nullableClassList; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull classMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable nullableClassMap; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +@class NSNumber; +@class NiTestsPigeonTypedData; +@class NSString; +/// A class containing all supported nullable types. +/// Generated bridge class from Pigeon that moves data from Swift to +/// Objective-C. +SWIFT_CLASS("_TtC11test_plugin24NIAllNullableTypesBridge") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NIAllNullableTypesBridge : NSObject +- (nonnull instancetype) + initWithANullableBool:(NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableInt64:(NSNumber* _Nullable)aNullableInt64 + aNullableDouble:(NSNumber* _Nullable)aNullableDouble + aNullableByteArray:(NiTestsPigeonTypedData* _Nullable)aNullableByteArray + aNullable4ByteArray:(NiTestsPigeonTypedData* _Nullable)aNullable4ByteArray + aNullable8ByteArray:(NiTestsPigeonTypedData* _Nullable)aNullable8ByteArray + aNullableFloatArray:(NiTestsPigeonTypedData* _Nullable)aNullableFloatArray + aNullableEnum:(NSNumber* _Nullable)aNullableEnum + anotherNullableEnum:(NSNumber* _Nullable)anotherNullableEnum + aNullableString:(NSString* _Nullable)aNullableString + aNullableObject:(NSObject* _Nullable)aNullableObject + allNullableTypes:(NIAllNullableTypesBridge* _Nullable)allNullableTypes + list:(NSArray* _Nullable)list + stringList:(NSArray* _Nullable)stringList + intList:(NSArray* _Nullable)intList + doubleList:(NSArray* _Nullable)doubleList + boolList:(NSArray* _Nullable)boolList + enumList:(NSArray* _Nullable)enumList + objectList:(NSArray* _Nullable)objectList + listList:(NSArray* _Nullable)listList + mapList:(NSArray* _Nullable)mapList + recursiveClassList:(NSArray* _Nullable)recursiveClassList + map:(NSDictionary, NSObject*>* _Nullable)map + stringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + intMap: + (NSDictionary, NSObject*>* _Nullable)intMap + enumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + objectMap: + (NSDictionary, NSObject*>* _Nullable)objectMap + listMap: + (NSDictionary, NSObject*>* _Nullable)listMap + mapMap: + (NSDictionary, NSObject*>* _Nullable)mapMap + recursiveClassMap: + (NSDictionary, NSObject*>* _Nullable)recursiveClassMap + OBJC_DESIGNATED_INITIALIZER; +@property(nonatomic, strong) NSNumber* _Nullable aNullableBool; +@property(nonatomic, strong) NSNumber* _Nullable aNullableInt; +@property(nonatomic, strong) NSNumber* _Nullable aNullableInt64; +@property(nonatomic, strong) NSNumber* _Nullable aNullableDouble; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullableByteArray; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullable4ByteArray; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullable8ByteArray; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullableFloatArray; +@property(nonatomic, strong) NSNumber* _Nullable aNullableEnum; +@property(nonatomic, strong) NSNumber* _Nullable anotherNullableEnum; +@property(nonatomic, strong) NSString* _Nullable aNullableString; +@property(nonatomic, strong) NSObject* _Nullable aNullableObject; +@property(nonatomic, strong) + NIAllNullableTypesBridge* _Nullable allNullableTypes; +@property(nonatomic, copy) NSArray* _Nullable list; +@property(nonatomic, copy) NSArray* _Nullable stringList; +@property(nonatomic, copy) NSArray* _Nullable intList; +@property(nonatomic, copy) NSArray* _Nullable doubleList; +@property(nonatomic, copy) NSArray* _Nullable boolList; +@property(nonatomic, copy) NSArray* _Nullable enumList; +@property(nonatomic, copy) NSArray* _Nullable objectList; +@property(nonatomic, copy) NSArray* _Nullable listList; +@property(nonatomic, copy) NSArray* _Nullable mapList; +@property(nonatomic, copy) NSArray* _Nullable recursiveClassList; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable map; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable stringMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable intMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable enumMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable objectMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable listMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable mapMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable recursiveClassMap; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NIAllNullableTypes] class is being used +/// to test Swift classes. Generated bridge class from Pigeon that moves data +/// from Swift to Objective-C. +SWIFT_CLASS("_TtC11test_plugin40NIAllNullableTypesWithoutRecursionBridge") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NIAllNullableTypesWithoutRecursionBridge : NSObject +- (nonnull instancetype) + initWithANullableBool:(NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableInt64:(NSNumber* _Nullable)aNullableInt64 + aNullableDouble:(NSNumber* _Nullable)aNullableDouble + aNullableByteArray:(NiTestsPigeonTypedData* _Nullable)aNullableByteArray + aNullable4ByteArray:(NiTestsPigeonTypedData* _Nullable)aNullable4ByteArray + aNullable8ByteArray:(NiTestsPigeonTypedData* _Nullable)aNullable8ByteArray + aNullableFloatArray:(NiTestsPigeonTypedData* _Nullable)aNullableFloatArray + aNullableEnum:(NSNumber* _Nullable)aNullableEnum + anotherNullableEnum:(NSNumber* _Nullable)anotherNullableEnum + aNullableString:(NSString* _Nullable)aNullableString + aNullableObject:(NSObject* _Nullable)aNullableObject + list:(NSArray* _Nullable)list + stringList:(NSArray* _Nullable)stringList + intList:(NSArray* _Nullable)intList + doubleList:(NSArray* _Nullable)doubleList + boolList:(NSArray* _Nullable)boolList + enumList:(NSArray* _Nullable)enumList + objectList:(NSArray* _Nullable)objectList + listList:(NSArray* _Nullable)listList + mapList:(NSArray* _Nullable)mapList + map:(NSDictionary, NSObject*>* _Nullable)map + stringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + intMap: + (NSDictionary, NSObject*>* _Nullable)intMap + enumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + objectMap: + (NSDictionary, NSObject*>* _Nullable)objectMap + listMap: + (NSDictionary, NSObject*>* _Nullable)listMap + mapMap: + (NSDictionary, NSObject*>* _Nullable)mapMap + OBJC_DESIGNATED_INITIALIZER; +@property(nonatomic, strong) NSNumber* _Nullable aNullableBool; +@property(nonatomic, strong) NSNumber* _Nullable aNullableInt; +@property(nonatomic, strong) NSNumber* _Nullable aNullableInt64; +@property(nonatomic, strong) NSNumber* _Nullable aNullableDouble; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullableByteArray; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullable4ByteArray; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullable8ByteArray; +@property(nonatomic, strong) + NiTestsPigeonTypedData* _Nullable aNullableFloatArray; +@property(nonatomic, strong) NSNumber* _Nullable aNullableEnum; +@property(nonatomic, strong) NSNumber* _Nullable anotherNullableEnum; +@property(nonatomic, strong) NSString* _Nullable aNullableString; +@property(nonatomic, strong) NSObject* _Nullable aNullableObject; +@property(nonatomic, copy) NSArray* _Nullable list; +@property(nonatomic, copy) NSArray* _Nullable stringList; +@property(nonatomic, copy) NSArray* _Nullable intList; +@property(nonatomic, copy) NSArray* _Nullable doubleList; +@property(nonatomic, copy) NSArray* _Nullable boolList; +@property(nonatomic, copy) NSArray* _Nullable enumList; +@property(nonatomic, copy) NSArray* _Nullable objectList; +@property(nonatomic, copy) NSArray* _Nullable listList; +@property(nonatomic, copy) NSArray* _Nullable mapList; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable map; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable stringMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable intMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable enumMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable objectMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable listMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nullable mapMap; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +enum NIAnEnum : NSInteger; +enum NIAnotherEnum : NSInteger; +/// A class containing all supported types. +/// Generated bridge class from Pigeon that moves data from Swift to +/// Objective-C. +SWIFT_CLASS("_TtC11test_plugin16NIAllTypesBridge") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) @interface NIAllTypesBridge : NSObject +- (nonnull instancetype) + initWithABool:(BOOL)aBool + anInt:(int64_t)anInt + anInt64:(int64_t)anInt64 + aDouble:(double)aDouble + aByteArray:(NiTestsPigeonTypedData* _Nonnull)aByteArray + a4ByteArray:(NiTestsPigeonTypedData* _Nonnull)a4ByteArray + a8ByteArray:(NiTestsPigeonTypedData* _Nonnull)a8ByteArray + aFloatArray:(NiTestsPigeonTypedData* _Nonnull)aFloatArray + anEnum:(enum NIAnEnum)anEnum + anotherEnum:(enum NIAnotherEnum)anotherEnum + aString:(NSString* _Nonnull)aString + anObject:(NSObject* _Nonnull)anObject + list:(NSArray* _Nonnull)list + stringList:(NSArray* _Nonnull)stringList + intList:(NSArray* _Nonnull)intList + doubleList:(NSArray* _Nonnull)doubleList + boolList:(NSArray* _Nonnull)boolList + enumList:(NSArray* _Nonnull)enumList + objectList:(NSArray* _Nonnull)objectList + listList:(NSArray* _Nonnull)listList + mapList:(NSArray* _Nonnull)mapList + map:(NSDictionary, NSObject*>* _Nonnull)map + stringMap:(NSDictionary, NSObject*>* _Nonnull)stringMap + intMap:(NSDictionary, NSObject*>* _Nonnull)intMap + enumMap:(NSDictionary, NSObject*>* _Nonnull)enumMap + objectMap:(NSDictionary, NSObject*>* _Nonnull)objectMap + listMap:(NSDictionary, NSObject*>* _Nonnull)listMap + mapMap:(NSDictionary, NSObject*>* _Nonnull)mapMap + OBJC_DESIGNATED_INITIALIZER; +@property(nonatomic) BOOL aBool; +@property(nonatomic) int64_t anInt; +@property(nonatomic) int64_t anInt64; +@property(nonatomic) double aDouble; +@property(nonatomic, strong) NiTestsPigeonTypedData* _Nonnull aByteArray; +@property(nonatomic, strong) NiTestsPigeonTypedData* _Nonnull a4ByteArray; +@property(nonatomic, strong) NiTestsPigeonTypedData* _Nonnull a8ByteArray; +@property(nonatomic, strong) NiTestsPigeonTypedData* _Nonnull aFloatArray; +@property(nonatomic) enum NIAnEnum anEnum; +@property(nonatomic) enum NIAnotherEnum anotherEnum; +@property(nonatomic, strong) NSString* _Nonnull aString; +@property(nonatomic, strong) NSObject* _Nonnull anObject; +@property(nonatomic, copy) NSArray* _Nonnull list; +@property(nonatomic, copy) NSArray* _Nonnull stringList; +@property(nonatomic, copy) NSArray* _Nonnull intList; +@property(nonatomic, copy) NSArray* _Nonnull doubleList; +@property(nonatomic, copy) NSArray* _Nonnull boolList; +@property(nonatomic, copy) NSArray* _Nonnull enumList; +@property(nonatomic, copy) NSArray* _Nonnull objectList; +@property(nonatomic, copy) NSArray* _Nonnull listList; +@property(nonatomic, copy) NSArray* _Nonnull mapList; +@property(nonatomic, copy) NSDictionary, NSObject*>* _Nonnull map; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull stringMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull intMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull enumMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull objectMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull listMap; +@property(nonatomic, copy) + NSDictionary, NSObject*>* _Nonnull mapMap; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +typedef SWIFT_ENUM(NSInteger, NIAnEnum, closed){ + NIAnEnumOne = 0, + NIAnEnumTwo = 1, + NIAnEnumThree = 2, + NIAnEnumFortyTwo = 3, + NIAnEnumFourHundredTwentyTwo = 4, +}; + +typedef SWIFT_ENUM(NSInteger, NIAnotherEnum, closed){ + NIAnotherEnumJustInCase = 0, +}; + +@class NiTestsError; +/// The core interface that the Dart platform_test code implements for host +/// integration tests to call into. +/// Generated protocol from Pigeon that represents Flutter messages that can be +/// called from Swift. +SWIFT_PROTOCOL("_TtP11test_plugin33NIFlutterIntegrationCoreApiBridge_") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@protocol NIFlutterIntegrationCoreApiBridge +/// A no-op function taking no arguments and returning no value, to sanity +/// test basic calling. +- (void)noopWithError:(NiTestsError* _Nonnull)error; +/// Returns a Flutter error, to test error handling. +- (NSObject* _Nullable)throwFlutterErrorWithError:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Responds with an error from an async function returning a value. +- (NSObject* _Nullable)throwErrorWithError:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Responds with an error from an async void function. +- (void)throwErrorFromVoidWithError:(NiTestsError* _Nonnull)error; +/// Returns the passed object, to test serialization and deserialization. +- (NIAllTypesBridge* _Nullable) + echoNIAllTypesWithEverything:(NIAllTypesBridge* _Nullable)everything + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NIAllNullableTypesBridge* _Nullable) + echoNIAllNullableTypesWithEverything: + (NIAllNullableTypesBridge* _Nullable)everything + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in arguments of multiple types. +/// Tests multiple-arity FlutterApi handling. +- (NIAllNullableTypesBridge* _Nullable) + sendMultipleNullableTypesWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableString: + (NSString* _Nullable)aNullableString + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + echoNIAllNullableTypesWithoutRecursionWithEverything: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable)everything + error: + (NiTestsError* _Nonnull) + error + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in arguments of multiple types. +/// Tests multiple-arity FlutterApi handling. +- (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + sendMultipleNullableTypesWithoutRecursionWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt: + (NSNumber* _Nullable) + aNullableInt + aNullableString: + (NSString* _Nullable) + aNullableString + error: + (NiTestsError* _Nonnull) + error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed boolean, to test serialization and deserialization. +- (NSNumber* _Nullable)echoBoolWithABool:(NSNumber* _Nullable)aBool + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int, to test serialization and deserialization. +- (NSNumber* _Nullable)echoIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed double, to test serialization and deserialization. +- (NSNumber* _Nullable)echoDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed string, to test serialization and deserialization. +- (NSString* _Nullable)echoStringWithAString:(NSString* _Nullable)aString + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed byte list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoUint8ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int32 list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoInt32ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int64 list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoInt64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed float64 list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoFloat64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable)echoListWithList: + (NSArray* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoClassListWithClassList:(NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullClassListWithClassList:(NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoMapWithMap:(NSDictionary, NSObject*>* _Nullable)map + error:(NiTestsError* _Nonnull)error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NiTestsError* _Nonnull)error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable)echoEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNIAnotherEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed boolean, to test serialization and deserialization. +- (NSNumber* _Nullable)echoNullableBoolWithABool:(NSNumber* _Nullable)aBool + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int, to test serialization and deserialization. +- (NSNumber* _Nullable)echoNullableIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed double, to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed string, to test serialization and deserialization. +- (NSString* _Nullable) + echoNullableStringWithAString:(NSString* _Nullable)aString + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed byte list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableUint8ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int32 list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableInt32ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int64 list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableInt64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed float64 list, to test serialization and deserialization. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableFloat64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableListWithList:(NSArray* _Nullable)list + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableClassListWithClassList:(NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable)echoNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoAnotherNullableEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error:(NiTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// A no-op function taking no arguments and returning no value, to sanity +/// test basic asynchronous calling. +- (void)noopAsyncWithError:(NiTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(void))completionHandler; +- (void)throwFlutterErrorAsyncWithError:(NiTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void)echoAsyncNIAllTypesWithEverything: + (NIAllTypesBridge* _Nullable)everything + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NIAllTypesBridge* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNIAllNullableTypesWithEverything: + (NIAllNullableTypesBridge* _Nullable)everything + error:(NiTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NIAllNullableTypesBridge* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable)everything + error: + (NiTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NIAllNullableTypesWithoutRecursionBridge* _Nullable)) + completionHandler; +- (void)echoAsyncBoolWithABool:(NSNumber* _Nullable)aBool + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAsyncIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAsyncDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAsyncStringWithAString:(NSString* _Nullable)aString + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSString* _Nullable))completionHandler; +- (void)echoAsyncUint8ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncInt32ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncInt64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncFloat64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncObjectWithAnObject:(NSObject* _Nullable)anObject + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable))completionHandler; +- (void)echoAsyncListWithList:(NSArray* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncClassListWithClassList:(NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNonNullClassListWithClassList: + (NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncMapWithMap:(NSDictionary, NSObject*>* _Nullable)map + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAnotherAsyncEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)echoAsyncNullableBoolWithABool:(NSNumber* _Nullable)aBool + error:(NiTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)echoAsyncNullableIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NiTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)echoAsyncNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)echoAsyncNullableStringWithAString:(NSString* _Nullable)aString + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableUint8ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableInt32ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableInt64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableFloat64ListWithList:(NiTestsPigeonTypedData* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncNullableObjectWithAnObject:(NSObject* _Nullable)anObject + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void)echoAsyncNullableListWithList:(NSArray* _Nullable)list + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableClassListWithClassList: + (NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + error: + (NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NiTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + echoAnotherAsyncNullableEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error:(NiTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +@end + +SWIFT_CLASS("_TtC11test_plugin36NIFlutterIntegrationCoreApiRegistrar") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NIFlutterIntegrationCoreApiRegistrar : NSObject ++ (void)registerInstanceWithApi: + (id _Nonnull)api + name:(NSString* _Nonnull)name; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +/// Generated setup class from Pigeon to register implemented +/// NIHostIntegrationCoreApi classes. +SWIFT_CLASS("_TtC11test_plugin29NIHostIntegrationCoreApiSetup") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NIHostIntegrationCoreApiSetup : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; ++ (NIHostIntegrationCoreApiSetup* _Nullable)getInstanceWithName: + (NSString* _Nonnull)name SWIFT_WARN_UNUSED_RESULT; +/// A no-op function taking no arguments and returning no value, to sanity +/// test basic calling. +- (void)noopWithWrappedError:(NiTestsError* _Nonnull)wrappedError; +/// Returns the passed object, to test serialization and deserialization. +- (NIAllTypesBridge* _Nullable) + echoAllTypesWithEverything:(NIAllTypesBridge* _Nonnull)everything + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns an error, to test error handling. +- (NSObject* _Nullable)throwErrorWithWrappedError: + (NiTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns an error from a void function, to test error handling. +- (void)throwErrorFromVoidWithWrappedError:(NiTestsError* _Nonnull)wrappedError; +/// Returns a Flutter error, to test error handling. +- (NSObject* _Nullable)throwFlutterErrorWithWrappedError: + (NiTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable)echoIntWithAnInt:(int64_t)anInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in double. +- (NSNumber* _Nullable)echoDoubleWithADouble:(double)aDouble + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in boolean. +- (NSNumber* _Nullable)echoBoolWithABool:(BOOL)aBool + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in string. +- (NSString* _Nullable)echoStringWithAString:(NSString* _Nonnull)aString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Uint8List. +- (NiTestsPigeonTypedData* _Nullable) + echoUint8ListWithAUint8List:(NiTestsPigeonTypedData* _Nonnull)aUint8List + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int32List. +- (NiTestsPigeonTypedData* _Nullable) + echoInt32ListWithAInt32List:(NiTestsPigeonTypedData* _Nonnull)aInt32List + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int64List. +- (NiTestsPigeonTypedData* _Nullable) + echoInt64ListWithAInt64List:(NiTestsPigeonTypedData* _Nonnull)aInt64List + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Float64List. +- (NiTestsPigeonTypedData* _Nullable) + echoFloat64ListWithAFloat64List: + (NiTestsPigeonTypedData* _Nonnull)aFloat64List + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in generic Object. +- (NSObject* _Nullable)echoObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoListWithList:(NSArray* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoStringListWithStringList:(NSArray* _Nonnull)stringList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoIntListWithIntList:(NSArray* _Nonnull)intList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoDoubleListWithDoubleList:(NSArray* _Nonnull)doubleList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoBoolListWithBoolList:(NSArray* _Nonnull)boolList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoClassListWithClassList:(NSArray* _Nonnull)classList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullClassListWithClassList:(NSArray* _Nonnull)classList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoMapWithMap:(NSDictionary, NSObject*>* _Nonnull)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed class to test nested class serialization and +/// deserialization. +- (NIAllClassesWrapperBridge* _Nullable) + echoClassWrapperWithWrapper:(NIAllClassesWrapperBridge* _Nonnull)wrapper + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable)echoEnumWithAnEnum:(enum NIAnEnum)anEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoAnotherEnumWithAnotherEnum:(enum NIAnotherEnum)anotherEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the default string. +- (NSString* _Nullable) + echoNamedDefaultStringWithAString:(NSString* _Nonnull)aString + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in double. +- (NSNumber* _Nullable) + echoOptionalDefaultDoubleWithADouble:(double)aDouble + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable)echoRequiredIntWithAnInt:(int64_t)anInt + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NIAllNullableTypesBridge* _Nullable) + echoAllNullableTypesWithEverything: + (NIAllNullableTypesBridge* _Nullable)everything + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + echoAllNullableTypesWithoutRecursionWithEverything: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable)everything + wrappedError:(NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the inner aString value from the wrapped object, to +/// test sending of nested objects. +- (NSString* _Nullable) + extractNestedNullableStringWithWrapper: + (NIAllClassesWrapperBridge* _Nonnull)wrapper + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the inner aString value from the wrapped object, to +/// test sending of nested objects. +- (NIAllClassesWrapperBridge* _Nullable) + createNestedNullableStringWithNullableString: + (NSString* _Nullable)nullableString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NIAllNullableTypesBridge* _Nullable) + sendMultipleNullableTypesWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableString: + (NSString* _Nullable)aNullableString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + sendMultipleNullableTypesWithoutRecursionWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt: + (NSNumber* _Nullable) + aNullableInt + aNullableString: + (NSString* _Nullable) + aNullableString + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable) + echoNullableIntWithANullableInt:(NSNumber* _Nullable)aNullableInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in double. +- (NSNumber* _Nullable) + echoNullableDoubleWithANullableDouble:(NSNumber* _Nullable)aNullableDouble + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in boolean. +- (NSNumber* _Nullable) + echoNullableBoolWithANullableBool:(NSNumber* _Nullable)aNullableBool + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in string. +- (NSString* _Nullable) + echoNullableStringWithANullableString:(NSString* _Nullable)aNullableString + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Uint8List. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableUint8ListWithANullableUint8List: + (NiTestsPigeonTypedData* _Nullable)aNullableUint8List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int32List. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableInt32ListWithANullableInt32List: + (NiTestsPigeonTypedData* _Nullable)aNullableInt32List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int64List. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableInt64ListWithANullableInt64List: + (NiTestsPigeonTypedData* _Nullable)aNullableInt64List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Float64List. +- (NiTestsPigeonTypedData* _Nullable) + echoNullableFloat64ListWithANullableFloat64List: + (NiTestsPigeonTypedData* _Nullable)aNullableFloat64List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in generic Object. +- (NSObject* _Nullable) + echoNullableObjectWithANullableObject:(NSObject* _Nonnull)aNullableObject + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableListWithANullableList: + (NSArray* _Nullable)aNullableList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableEnumListWithEnumList:(NSArray* _Nullable)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableClassListWithClassList:(NSArray* _Nullable)classList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable)echoNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + echoAnotherNullableEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable) + echoOptionalNullableIntWithANullableInt:(NSNumber* _Nullable)aNullableInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in string. +- (NSString* _Nullable) + echoNamedNullableStringWithANullableString: + (NSString* _Nullable)aNullableString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// A no-op function taking no arguments and returning no value, to sanity +/// test basic asynchronous calling. +- (void)noopAsyncWithWrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(void))completionHandler; +/// Returns passed in int asynchronously. +- (void)echoAsyncIntWithAnInt:(int64_t)anInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns passed in double asynchronously. +- (void)echoAsyncDoubleWithADouble:(double)aDouble + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns the passed in boolean asynchronously. +- (void)echoAsyncBoolWithABool:(BOOL)aBool + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns the passed string asynchronously. +- (void)echoAsyncStringWithAString:(NSString* _Nonnull)aString + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable))completionHandler; +/// Returns the passed in Uint8List asynchronously. +- (void)echoAsyncUint8ListWithAUint8List: + (NiTestsPigeonTypedData* _Nonnull)aUint8List + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int32List asynchronously. +- (void)echoAsyncInt32ListWithAInt32List: + (NiTestsPigeonTypedData* _Nonnull)aInt32List + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int64List asynchronously. +- (void)echoAsyncInt64ListWithAInt64List: + (NiTestsPigeonTypedData* _Nonnull)aInt64List + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Float64List asynchronously. +- (void) + echoAsyncFloat64ListWithAFloat64List: + (NiTestsPigeonTypedData* _Nonnull)aFloat64List + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in generic Object asynchronously. +- (void)echoAsyncObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable))completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncListWithList:(NSArray* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncClassListWithClassList:(NSArray* _Nonnull)classList + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncMapWithMap:(NSDictionary, NSObject*>* _Nonnull)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncEnumWithAnEnum:(enum NIAnEnum)anEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAnotherAsyncEnumWithAnotherEnum:(enum NIAnotherEnum)anotherEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Responds with an error from an async function returning a value. +- (void)throwAsyncErrorWithWrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +/// Responds with an error from an async void function. +- (void)throwAsyncErrorFromVoidWithWrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(void))completionHandler; +/// Responds with a Flutter error from an async function returning a value. +- (void)throwAsyncFlutterErrorWithWrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +/// Returns the passed object, to test async serialization and deserialization. +- (void)echoAsyncNIAllTypesWithEverything:(NIAllTypesBridge* _Nonnull)everything + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NIAllTypesBridge* _Nullable)) + completionHandler; +/// Returns the passed object, to test serialization and deserialization. +- (void) + echoAsyncNullableNIAllNullableTypesWithEverything: + (NIAllNullableTypesBridge* _Nullable)everything + wrappedError:(NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NIAllNullableTypesBridge* _Nullable)) + completionHandler; +/// Returns the passed object, to test serialization and deserialization. +- (void) + echoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable)everything + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NIAllNullableTypesWithoutRecursionBridge* _Nullable)) + completionHandler; +/// Returns passed in int asynchronously. +- (void)echoAsyncNullableIntWithAnInt:(NSNumber* _Nullable)anInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns passed in double asynchronously. +- (void)echoAsyncNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns the passed in boolean asynchronously. +- (void)echoAsyncNullableBoolWithABool:(NSNumber* _Nullable)aBool + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns the passed string asynchronously. +- (void)echoAsyncNullableStringWithAString:(NSString* _Nullable)aString + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +/// Returns the passed in Uint8List asynchronously. +- (void)echoAsyncNullableUint8ListWithAUint8List: + (NiTestsPigeonTypedData* _Nullable)aUint8List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int32List asynchronously. +- (void)echoAsyncNullableInt32ListWithAInt32List: + (NiTestsPigeonTypedData* _Nullable)aInt32List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int64List asynchronously. +- (void)echoAsyncNullableInt64ListWithAInt64List: + (NiTestsPigeonTypedData* _Nullable)aInt64List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Float64List asynchronously. +- (void)echoAsyncNullableFloat64ListWithAFloat64List: + (NiTestsPigeonTypedData* _Nullable)aFloat64List + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in generic Object asynchronously. +- (void)echoAsyncNullableObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncNullableListWithList:(NSArray* _Nullable)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncNullableClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed map, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAnotherAsyncNullableEnumWithAnotherEnum: + (NSNumber* _Nullable)anotherEnum + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterNoopWithWrappedError:(NiTestsError* _Nonnull)wrappedError; +- (NSObject* _Nullable)callFlutterThrowErrorWithWrappedError: + (NiTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +- (void)callFlutterThrowErrorFromVoidWithWrappedError: + (NiTestsError* _Nonnull)wrappedError; +- (NIAllTypesBridge* _Nullable) + callFlutterEchoNIAllTypesWithEverything: + (NIAllTypesBridge* _Nonnull)everything + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NIAllNullableTypesBridge* _Nullable) + callFlutterEchoNIAllNullableTypesWithEverything: + (NIAllNullableTypesBridge* _Nullable)everything + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NIAllNullableTypesBridge* _Nullable) + callFlutterSendMultipleNullableTypesWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable) + aNullableInt + aNullableString:(NSString* _Nullable) + aNullableString + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + callFlutterEchoNIAllNullableTypesWithoutRecursionWithEverything: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable)everything + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NIAllNullableTypesWithoutRecursionBridge* _Nullable) + callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt: + (NSNumber* _Nullable) + aNullableInt + aNullableString: + (NSString* _Nullable) + aNullableString + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable)callFlutterEchoBoolWithABool:(BOOL)aBool + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable)callFlutterEchoIntWithAnInt:(int64_t)anInt + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable)callFlutterEchoDoubleWithADouble:(double)aDouble + wrappedError:(NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSString* _Nullable) + callFlutterEchoStringWithAString:(NSString* _Nonnull)aString + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoUint8ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoInt32ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoInt64ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoFloat64ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoListWithList:(NSArray* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNonNullEnumListWithEnumList: + (NSArray* _Nonnull)enumList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNonNullClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoMapWithMap: + (NSDictionary, NSObject*>* _Nonnull)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable)callFlutterEchoEnumWithAnEnum:(enum NIAnEnum)anEnum + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNIAnotherEnumWithAnotherEnum:(enum NIAnotherEnum)anotherEnum + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableBoolWithABool:(NSNumber* _Nullable)aBool + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableIntWithAnInt:(NSNumber* _Nullable)anInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSString* _Nullable) + callFlutterEchoNullableStringWithAString:(NSString* _Nullable)aString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableUint8ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableInt32ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableInt64ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NiTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableFloat64ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableListWithList:(NSArray* _Nullable)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError:(NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError:(NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoAnotherNullableEnumWithAnotherEnum: + (NSNumber* _Nullable)anotherEnum + wrappedError:(NiTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (void)callFlutterNoopAsyncWithWrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(void))completionHandler; +- (void)callFlutterEchoAsyncNIAllTypesWithEverything: + (NIAllTypesBridge* _Nonnull)everything + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NIAllTypesBridge* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNIAllNullableTypesWithEverything: + (NIAllNullableTypesBridge* _Nullable)everything + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NIAllNullableTypesBridge* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNIAllNullableTypesWithoutRecursionWithEverything: + (NIAllNullableTypesWithoutRecursionBridge* _Nullable)everything + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void ( + ^_Nonnull)( + NIAllNullableTypesWithoutRecursionBridge* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncBoolWithABool:(BOOL)aBool + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncIntWithAnInt:(int64_t)anInt + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncDoubleWithADouble:(double)aDouble + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncStringWithAString:(NSString* _Nonnull)aString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncUint8ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncInt32ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncInt64ListWithList:(NiTestsPigeonTypedData* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncFloat64ListWithList: + (NiTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncListWithList:(NSArray* _Nonnull)list + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncEnumListWithEnumList: + (NSArray* _Nonnull)enumList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNonNullEnumListWithEnumList: + (NSArray* _Nonnull)enumList + wrappedError:(NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNonNullClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncMapWithMap: + (NSDictionary, NSObject*>* _Nonnull)map + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncEnumWithAnEnum:(enum NIAnEnum)anEnum + wrappedError:(NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAnotherAsyncEnumWithAnotherEnum: + (enum NIAnotherEnum)anotherEnum + wrappedError:(NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableBoolWithABool:(NSNumber* _Nullable)aBool + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableIntWithAnInt:(NSNumber* _Nullable)anInt + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableStringWithAString:(NSString* _Nullable)aString + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableUint8ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError:(NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableInt32ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError:(NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableInt64ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError:(NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableFloat64ListWithList: + (NiTestsPigeonTypedData* _Nullable)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NiTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterThrowFlutterErrorAsyncWithWrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableListWithList:(NSArray* _Nullable)list + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray< + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray< + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary< + id, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum: + (NSNumber* _Nullable)anotherEnum + wrappedError: + (NiTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSNumber* _Nullable)) + completionHandler; +/// Returns true if the handler is run on a main thread. +- (NSNumber* _Nullable)defaultIsMainThreadWithWrappedError: + (NiTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Spawns a background thread and calls noop on the +/// [NIFlutterIntegrationCoreApi]. Returns the result of whether the flutter +/// call was successful. +- (void) + callFlutterNoopOnBackgroundThreadWithWrappedError: + (NiTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +@end + +/// Generated bridge class from Pigeon that moves data from Swift to +/// Objective-C. +SWIFT_CLASS("_TtC11test_plugin19NIUnusedClassBridge") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NIUnusedClassBridge : NSObject +- (nonnull instancetype)initWithAField:(NSObject* _Nullable)aField + OBJC_DESIGNATED_INITIALIZER; +@property(nonatomic, strong) NSObject* _Nullable aField; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +/// Error class for passing custom error details to Dart side. +SWIFT_CLASS("_TtC11test_plugin12NiTestsError") +@interface NiTestsError : NSObject +@property(nonatomic, copy) NSString* _Nullable code; +@property(nonatomic, copy) NSString* _Nullable message; +@property(nonatomic, copy) NSString* _Nullable details; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)initWithCode:(NSString* _Nullable)code + message:(NSString* _Nullable)message + details:(NSString* _Nullable)details + OBJC_DESIGNATED_INITIALIZER; +@end + +SWIFT_CLASS("_TtC11test_plugin20NiTestsNumberWrapper") +@interface NiTestsNumberWrapper : NSObject +- (nonnull instancetype)initWithNumber:(NSNumber* _Nonnull)number + type:(NSInteger)type + OBJC_DESIGNATED_INITIALIZER; +- (id _Nonnull)copyWithZone:(struct _NSZone* _Nullable)zone + SWIFT_WARN_UNUSED_RESULT; +@property(nonatomic, strong) NSNumber* _Nonnull number; +@property(nonatomic) NSInteger type; +- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; +@property(nonatomic, readonly) NSUInteger hash; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +SWIFT_CLASS("_TtC11test_plugin25NiTestsPigeonInternalNull") +@interface NiTestsPigeonInternalNull : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSData; +SWIFT_CLASS("_TtC11test_plugin22NiTestsPigeonTypedData") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NiTestsPigeonTypedData : NSObject +@property(nonatomic, readonly, strong) NSData* _Nonnull data; +@property(nonatomic, readonly) NSInteger type; +- (nonnull instancetype)initWithData:(NSData* _Nonnull)data + type:(NSInteger)type + OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +#endif +#if __has_attribute(external_source_symbol) +#pragma clang attribute pop +#endif +#if defined(__cplusplus) +#endif +#pragma clang diagnostic pop +#endif diff --git a/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle b/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle index b83203f03197..5e5a57891a50 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle +++ b/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle @@ -18,10 +18,10 @@ pluginManagement { // See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info. plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.11.1" apply false - id "org.jetbrains.kotlin.android" version "2.2.20" apply false - id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.1" + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.11.1" apply false + id "org.jetbrains.kotlin.android" version "2.1.0" apply false + id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.1" } include ":app" diff --git a/packages/pigeon/platform_tests/test_plugin/example/ffigen_config.dart b/packages/pigeon/platform_tests/test_plugin/example/ffigen_config.dart new file mode 100644 index 000000000000..99d49dd41423 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/ffigen_config.dart @@ -0,0 +1,136 @@ +import 'dart:io'; +import 'package:ffigen/ffigen.dart' as fg; +import 'package:pub_semver/pub_semver.dart'; +import 'package:swift2objc/src/ast/_core/interfaces/declaration.dart'; +import 'package:swiftgen/src/config.dart'; +import 'package:swiftgen/swiftgen.dart'; + +Future main(List args) async { + var sdkPath = + '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk'; + if (args.isNotEmpty) { + sdkPath = args[0]; + } else { + var didFallback = true; + try { + final ProcessResult result = await Process.run('xcrun', [ + '--sdk', + 'iphoneos', + '--show-sdk-path', + ]); + if (result.exitCode == 0) { + sdkPath = (result.stdout as String).trim(); + didFallback = false; + } + } catch (_) {} + if (didFallback) { + // ignore: avoid_print + print( + 'Failed to find iOS SDK path with xcrun. Falling back to default iOS SDK path.', + ); + // ignore: avoid_print + print( + 'If FFI generation fails, please provide a valid iOS SDK path in the Pigeon configuration for SwiftOptions(appleSdkPath: ...), or pass it as an argument when running ffigen.', + ); + } + } + + final classes = [ + 'NiTestsPigeonInternalNull', + 'NiTestsPigeonTypedData', + 'NiTestsNumberWrapper', + 'NSURLCredential', + 'NIHostIntegrationCoreApi', + 'NIHostIntegrationCoreApiSetup', + 'NIFlutterIntegrationCoreApiBridge', + 'NIFlutterIntegrationCoreApiRegistrar', + 'NIUnusedClassBridge', + 'NIAllTypesBridge', + 'NIAllNullableTypesBridge', + 'NIAllNullableTypesWithoutRecursionBridge', + 'NIAllClassesWrapperBridge', + 'NiTestsError', + ]; + final enums = [ + 'NIAnEnum', + 'NIAnotherEnum', + 'NSURLSessionAuthChallengeDisposition', + 'NiTestsMyDataType', + ]; + var targetTriple = ''; + if (targetTriple.isEmpty) { + targetTriple = sdkPath.toLowerCase().contains('macosx') + ? 'x86_64-apple-macosx14.0' + : 'arm64-apple-ios'; + } + + await SwiftGenerator( + target: Target(triple: targetTriple, sdk: Uri.directory(sdkPath)), + inputs: [ + ObjCCompatibleSwiftFileInput( + files: [ + Uri.file( + '/Users/tarrinneal/work/packages/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NiTests.gen.swift', + ), + ], + ), + ], + include: (Declaration d) => + classes.contains(d.name) || enums.contains(d.name), + output: Output( + module: 'test_plugin', + dartFile: Uri.file( + '/Users/tarrinneal/work/packages/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/ni_tests.gen.ffi.dart', + ), + objectiveCFile: Uri.file( + '/Users/tarrinneal/work/packages/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc/NiTests.gen.m', + ), + preamble: ''' + // 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. + // + + // ignore_for_file: always_specify_types, camel_case_types, non_constant_identifier_names, unnecessary_non_null_assertion, unused_element, unused_field + // coverage:ignore-file + ''', + ), + ffigen: FfiGeneratorOptions( + objectiveC: fg.ObjectiveC( + externalVersions: fg.ExternalVersions( + ios: fg.Versions(min: Version(12, 0, 0)), + macos: fg.Versions(min: Version(10, 14, 0)), + ), + interfaces: fg.Interfaces( + include: (fg.Declaration decl) => + classes.contains(decl.originalName) || + enums.contains(decl.originalName), + module: (fg.Declaration decl) { + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return 'test_plugin'; + } + + return decl.originalName.startsWith('NS') ? null : 'test_plugin'; + }, + ), + protocols: fg.Protocols( + include: (fg.Declaration decl) => classes.contains(decl.originalName), + module: (fg.Declaration decl) { + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return 'test_plugin'; + } + + return decl.originalName.startsWith('NS') ? null : 'test_plugin'; + }, + ), + ), + ), + ).generate( + logger: null, + tempDirectory: Uri.directory( + '/Users/tarrinneal/work/packages/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc', + ), + ); +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/ios/Runner.xcodeproj/project.pbxproj b/packages/pigeon/platform_tests/test_plugin/example/ios/Runner.xcodeproj/project.pbxproj index 1c93e5bc05f0..f6dccc147f71 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/pigeon/platform_tests/test_plugin/example/ios/Runner.xcodeproj/project.pbxproj @@ -22,6 +22,8 @@ 33A341D5291ECDFD00D34E0F /* AsyncHandlersTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33A341C9291ECDFD00D34E0F /* AsyncHandlersTest.swift */; }; 33A341D6291ECDFD00D34E0F /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33A341CA291ECDFD00D34E0F /* Utils.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 47A387102ECEE180005116FC /* PigeonTypedDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A3870F2ECEE180005116FC /* PigeonTypedDataTests.swift */; }; + 6885ADFFF3D912887C317B7C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 786308B4AA81D1B6AA2FA10F /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 8F85C49D2BBB14F30053FB60 /* InstanceManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F85C49C2BBB14F30053FB60 /* InstanceManagerTests.swift */; }; @@ -73,6 +75,9 @@ 33A341C9291ECDFD00D34E0F /* AsyncHandlersTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncHandlersTest.swift; sourceTree = ""; }; 33A341CA291ECDFD00D34E0F /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 407DC1E57B864B3AC2D1D534 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 47A3870F2ECEE180005116FC /* PigeonTypedDataTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PigeonTypedDataTests.swift; sourceTree = ""; }; + 4E640DBB26024C85BF85408E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = Flutter/ephemeral/Packages/.packages/FlutterFramework; sourceTree = ""; }; @@ -113,6 +118,7 @@ 33A341B6291ECCA100D34E0F /* RunnerTests */ = { isa = PBXGroup; children = ( + 47A3870F2ECEE180005116FC /* PigeonTypedDataTests.swift */, 33A341C0291ECDFD00D34E0F /* AllDatatypesTests.swift */, 33A341C9291ECDFD00D34E0F /* AsyncHandlersTest.swift */, 33A341C4291ECDFD00D34E0F /* EchoBinaryMessenger.swift */, @@ -220,6 +226,7 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 559A5C8B82F5C3FBBBC79619 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -313,6 +320,67 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 559A5C8B82F5C3FBBBC79619 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 68071F6E376CAAF900FEFD29 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 7E33641B55112906F49CAB0C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -345,6 +413,7 @@ 33A341D5291ECDFD00D34E0F /* AsyncHandlersTest.swift in Sources */, 33A341CE291ECDFD00D34E0F /* EnumTests.swift in Sources */, 33A341CD291ECDFD00D34E0F /* ListTests.swift in Sources */, + 47A387102ECEE180005116FC /* PigeonTypedDataTests.swift in Sources */, E04641FA2A46270400661C9E /* NSNullFieldTests.swift in Sources */, 33A341D1291ECDFD00D34E0F /* MockBinaryMessenger.swift in Sources */, 33A341CF291ECDFD00D34E0F /* NonNullFieldsTest.swift in Sources */, @@ -395,6 +464,7 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -421,7 +491,6 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -539,7 +608,6 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -568,6 +636,7 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -594,7 +663,6 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; @@ -672,7 +740,7 @@ 33A341BD291ECCA100D34E0F /* Profile */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; @@ -682,7 +750,7 @@ 249021D3217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { isa = XCConfigurationList; @@ -692,7 +760,7 @@ 249021D4217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ diff --git a/packages/pigeon/platform_tests/test_plugin/example/ios/RunnerTests/PigeonTypedDataTests.swift b/packages/pigeon/platform_tests/test_plugin/example/ios/RunnerTests/PigeonTypedDataTests.swift new file mode 100644 index 000000000000..8e597b0176bd --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/ios/RunnerTests/PigeonTypedDataTests.swift @@ -0,0 +1,74 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import Flutter +import Foundation +import XCTest + +@testable import test_plugin + +class NiTestsPigeonTypedDataTests: XCTestCase { + + // Helper to create NSData from an array of numbers + private func makeData(from array: [T]) -> NSData { + return array.withUnsafeBufferPointer { buffer in + NSData(bytes: buffer.baseAddress, length: buffer.count * MemoryLayout.stride) + } + } + + func testUint8Array() { + let sourceArray: [UInt8] = [1, 2, 3, 4, 255] + let data = makeData(from: sourceArray) + let typedData = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.uint8.rawValue) + + XCTAssert(typedData.toUint8Array() == sourceArray) + + let wrongType = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.int32.rawValue) + XCTAssert(wrongType.toUint8Array() == nil) + } + + func testInt32Array() { + let sourceArray: [Int32] = [-1, 0, 1, Int32.max, Int32.min] + let data = makeData(from: sourceArray) + let typedData = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.int32.rawValue) + + XCTAssert(typedData.toInt32Array() == sourceArray) + + let wrongType = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.uint8.rawValue) + XCTAssert(wrongType.toInt32Array() == nil) + + let badData = data.subdata(with: NSRange(location: 0, length: data.length - 1)) + let invalidLength = NiTestsPigeonTypedData( + data: badData as NSData, type: NiTestsMyDataType.int32.rawValue) + XCTAssert(invalidLength.toInt32Array() == nil) + } + + func testInt64Array() { + let sourceArray: [Int64] = [-1, 0, 1, Int64.max, Int64.min] + let data = makeData(from: sourceArray) + let typedData = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.int64.rawValue) + + XCTAssert(typedData.toInt64Array() == sourceArray) + } + + func testFloat32Array() { + let sourceArray: [Float32] = [ + -1.5, 0.0, 1.5, Float32.greatestFiniteMagnitude, -Float32.greatestFiniteMagnitude, + ] + let data = makeData(from: sourceArray) + let typedData = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.float32.rawValue) + + XCTAssert(typedData.toFloat32Array() == sourceArray) + } + + func testFloat64Array() { + let sourceArray: [Double] = [ + -1.5, 0.0, 1.5, Double.greatestFiniteMagnitude, -Double.greatestFiniteMagnitude, + ] + let data = makeData(from: sourceArray) + let typedData = NiTestsPigeonTypedData(data: data, type: NiTestsMyDataType.float64.rawValue) + + XCTAssert(typedData.toFloat64Array() == sourceArray) + } +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/jnigen_config.dart b/packages/pigeon/platform_tests/test_plugin/example/jnigen_config.dart new file mode 100644 index 000000000000..095e023ac593 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/jnigen_config.dart @@ -0,0 +1,43 @@ +// ignore_for_file: prefer_const_constructors +import 'package:jnigen/jnigen.dart'; +import 'package:logging/logging.dart'; +import 'package:pigeon/jnigen_fix.dart'; + +void main() async { + await generateJniBindings( + Config( + androidSdkConfig: AndroidSdkConfig( + addGradleDeps: true, + androidExample: './', + ), + summarizerOptions: SummarizerOptions(backend: SummarizerBackend.asm), + outputConfig: OutputConfig( + dartConfig: DartCodeOutputConfig( + path: Uri.file( + '../../shared_test_plugin_code/lib/src/generated/ni_tests.gen.jni.dart', + ), + structure: OutputStructure.singleFile, + ), + ), + logLevel: Level.ALL, + classes: [ + 'NiTestsError', + 'NIHostIntegrationCoreApi', + 'NIHostIntegrationCoreApiRegistrar', + 'NIFlutterIntegrationCoreApi', + 'NIFlutterIntegrationCoreApiRegistrar', + 'NIUnusedClass', + 'NIAllTypes', + 'NIAllNullableTypes', + 'NIAllNullableTypesWithoutRecursion', + 'NIAllClassesWrapper', + 'NIAnEnum', + 'NIAnotherEnum', + ], + ), + ); + + fixJniBindings( + '../../shared_test_plugin_code/lib/src/generated/ni_tests.gen.jni.dart', + ); +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake b/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake index 98e2c9fa93fd..c9e42af4da17 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake +++ b/packages/pigeon/platform_tests/test_plugin/example/linux/flutter/generated_plugins.cmake @@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml index 96edc8061b7c..b25a3d46b854 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml +++ b/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml @@ -6,10 +6,36 @@ environment: sdk: ^3.9.0 dependencies: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 flutter: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + pub_semver: ^2.2.0 shared_test_plugin_code: path: ../../shared_test_plugin_code + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 test_plugin: path: ../ @@ -18,6 +44,36 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter + logging: ^1.3.0 + pigeon: + path: ../../.. + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 flutter: uses-material-design: true + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 \ No newline at end of file diff --git a/packages/pigeon/platform_tests/test_plugin/example/windows/flutter/generated_plugins.cmake b/packages/pigeon/platform_tests/test_plugin/example/windows/flutter/generated_plugins.cmake index 8b8b5042fbb3..d5ebbd6a89db 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/windows/flutter/generated_plugins.cmake +++ b/packages/pigeon/platform_tests/test_plugin/example/windows/flutter/generated_plugins.cmake @@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml index 1c32f7b749b0..4ba4579d0504 100644 --- a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml +++ b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml @@ -25,9 +25,41 @@ flutter: pluginClass: TestPluginCApi dependencies: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 flutter: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 dev_dependencies: flutter_test: sdk: flutter + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: a1b844b93b95882fc9d47a19371a63a163132dd6 \ No newline at end of file diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index 0fc8a2cdd64c..cf1f88c3b378 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -2,7 +2,7 @@ name: pigeon description: Code generator tool to make communication between Flutter and the host platform type-safe and easier. repository: https://github.com/flutter/packages/tree/main/packages/pigeon issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22 -version: 26.3.1 # This must match the version in lib/src/generator_tools.dart +version: 26.4.0 # This must match the version in lib/src/generator_tools.dart environment: sdk: ^3.9.0 diff --git a/packages/pigeon/test/dart_generator_test.dart b/packages/pigeon/test/dart_generator_test.dart index f3774fc75c92..143f5ba5fb05 100644 --- a/packages/pigeon/test/dart_generator_test.dart +++ b/packages/pigeon/test/dart_generator_test.dart @@ -80,7 +80,7 @@ void main() { final code = sink.toString(); expect(code, contains('enum Foobar')); expect(code, contains(' one,')); - expect(code, contains(' two,')); + expect(code, contains(' two;')); }); test('gen one host api', () { diff --git a/packages/pigeon/test/generator_tools_test.dart b/packages/pigeon/test/generator_tools_test.dart index 183865f1e3f3..ef6643c55954 100644 --- a/packages/pigeon/test/generator_tools_test.dart +++ b/packages/pigeon/test/generator_tools_test.dart @@ -65,7 +65,7 @@ void main() { '2': {'1': '1', '2': '2', '3': '3'}, '3': '3', }; - expect(_equalMaps(expected, mergeMaps(source, modification)), isTrue); + expect(_equalMaps(expected, mergePigeonMaps(source, modification)), isTrue); }); test('get codec types from all classes and enums', () { diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index c71a7401dc1b..e424d7d5820b 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -35,6 +35,12 @@ const Map> _unsupportedFiles = GeneratorLanguage.java, GeneratorLanguage.objc, }, + 'ni_tests': { + GeneratorLanguage.cpp, + GeneratorLanguage.gobject, + GeneratorLanguage.java, + GeneratorLanguage.objc, + }, }; String _snakeToPascalCase(String snake) { @@ -92,6 +98,7 @@ Future generateTestPigeons({ 'nullable_returns', 'primitive', 'proxy_api_tests', + 'ni_tests', }; const testPluginName = 'test_plugin'; @@ -130,6 +137,7 @@ Future generateTestPigeons({ // Generate the default language test plugin output. int generateCode = await runPigeon( input: './pigeons/$input.dart', + appDirectory: '$outputBase/example/', dartOut: '$sharedDartOutputBase/lib/src/generated/$input.gen.dart', dartTestOut: input == 'message' ? '$sharedDartOutputBase/test/test_message.gen.dart' @@ -142,6 +150,7 @@ Future generateTestPigeons({ : '$outputBase/android/src/main/kotlin/com/example/test_plugin/$pascalCaseName.gen.kt', kotlinPackage: 'com.example.test_plugin', kotlinErrorClassName: kotlinErrorName, + kotlinUseJni: input == 'ni_tests', kotlinIncludeErrorClass: input != 'primitive', // iOS/macOS swiftOut: skipLanguages.contains(GeneratorLanguage.swift) @@ -149,6 +158,8 @@ Future generateTestPigeons({ : '$outputBase/darwin/$testPluginName/Sources/$testPluginName/$pascalCaseName.gen.swift', swiftErrorClassName: swiftErrorClassName, swiftIncludeErrorClass: input != 'primitive', + swiftUseFfi: input == 'ni_tests', + swiftAppDirectory: '$outputBase/example', // Linux gobjectHeaderOut: skipLanguages.contains(GeneratorLanguage.gobject) ? null @@ -228,14 +239,19 @@ Future generateTestPigeons({ Future runPigeon({ required String input, + String? appDirectory, String? kotlinOut, String? kotlinPackage, String? kotlinErrorClassName, + bool kotlinUseJni = false, bool kotlinIncludeErrorClass = true, + String kotlinAppDirectory = '', bool kotlinUseGeneratedAnnotation = false, bool swiftIncludeErrorClass = true, String? swiftOut, String? swiftErrorClassName, + bool swiftUseFfi = false, + String swiftAppDirectory = '', String? cppHeaderOut, String? cppSourceOut, String? cppNamespace, @@ -288,6 +304,7 @@ Future runPigeon({ final int result = await Pigeon.runWithOptions( PigeonOptions( input: input, + appDirectory: appDirectory, copyrightHeader: copyrightHeader, dartOut: dartOut, dartTestOut: dartTestOut, @@ -307,6 +324,7 @@ Future runPigeon({ package: kotlinPackage, errorClassName: kotlinErrorClassName, includeErrorClass: kotlinIncludeErrorClass, + useJni: kotlinUseJni, useGeneratedAnnotation: kotlinUseGeneratedAnnotation, ), objcHeaderOut: objcHeaderOut, @@ -319,6 +337,8 @@ Future runPigeon({ swiftOptions: SwiftOptions( errorClassName: swiftErrorClassName, includeErrorClass: swiftIncludeErrorClass, + useFfi: swiftUseFfi, + appDirectory: swiftAppDirectory, ), basePath: basePath, dartPackageName: dartPackageName, diff --git a/script/configs/allowed_unpinned_deps.yaml b/script/configs/allowed_unpinned_deps.yaml index f139fc20c341..b154e02d448c 100644 --- a/script/configs/allowed_unpinned_deps.yaml +++ b/script/configs/allowed_unpinned_deps.yaml @@ -42,6 +42,8 @@ - http - intl - io +- jni +- jnigen - js - json_serializable - leak_tracker @@ -62,6 +64,8 @@ - shelf_static - source_gen - stream_transform +- swift2objc +- swiftgen - test - test_api - vm_service